X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot_db.php;h=e5f1f0bd3bc1488c547658a6e62677bcd042c271;hp=4e87cf9c87927978eb2ed671d7554cc5e2fe5458;hb=36ef21a5707926b0a65ca2537c4aa662f33d757c;hpb=af140085fe603c00c7ce98435b89d2ee56a10cd9 diff --git a/phpfspot_db.php b/phpfspot_db.php index 4e87cf9..e5f1f0b 100644 --- a/phpfspot_db.php +++ b/phpfspot_db.php @@ -2,8 +2,9 @@ /*************************************************************************** * - * Copyright (c) by Andreas Unterkircher, unki@netshadow.at - * All rights reserved + * phpfspot, presents your F-Spot photo collection in Web browsers. + * + * Copyright (c) by Andreas Unterkircher * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,6 +74,7 @@ class PHPFSPOT_DB { $this->setConnStatus(false); } else { + sqlite3_create_function($this->db, 'basename', 1, 'basename'); $this->setConnStatus(true); } break; @@ -202,10 +204,10 @@ class PHPFSPOT_DB { $result = $this->db_query($query); switch($this->parent->cfg->db_access) { case 'native': - $row = $result->fetchRow(); + $row = $this->db_fetch_object($result); break; case 'pdo': - $row = $result[0]; + $row = $result->fetch(); break; } return $row;