summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-12-30 13:45:14 +0100
committerAndreas Unterkircher <unki@netshadow.at>2007-12-30 13:45:37 +0100
commitb6feb2818910fd4e1bc38e71773b897d869a49d9 (patch)
treef197a9a5a8e21b80952f9f6bdc7445b945c36c6c
parent431b2c5f99629be3a4d311ce07f9a7d7ebf96375 (diff)
issue82, use URI handler also for older F-Spot database versions
-rw-r--r--phpfspot.class.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 5e64117..89017e0 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -300,13 +300,19 @@ class PHPFSPOT {
";
}
- $result = $this->db->db_query($query_str);
+ if($result = $this->db->db_query($query_str)) {
- if($this->dbver < 9) {
- $result['uri'] = "file://". $result['directory_path'] ."/". $result['name'];
- }
+ $row = $this->db->db_fetch_object($result);
+
+ if($this->dbver < 9) {
+ $row['uri'] = "file://". $row['directory_path'] ."/". $row['name'];
+ }
- return $this->db->db_fetch_object($result);
+ return $row;
+
+ }
+
+ return null;
} // get_photo_details