From: Andreas Unterkircher Date: Sun, 30 Dec 2007 12:45:14 +0000 (+0100) Subject: issue82, use URI handler also for older F-Spot database versions X-Git-Tag: phpfspot-1.2~14 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6feb2818910fd4e1bc38e71773b897d869a49d9;p=phpfspot.git issue82, use URI handler also for older F-Spot database versions --- 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