From b6feb2818910fd4e1bc38e71773b897d869a49d9 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sun, 30 Dec 2007 13:45:14 +0100 Subject: [PATCH] issue82, use URI handler also for older F-Spot database versions --- phpfspot.class.php | 16 +++++++++++----- 1 file 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 -- 2.25.1