From: Andreas Unterkircher Date: Mon, 31 Dec 2007 13:45:02 +0000 (+0100) Subject: issue85, fix SQL error when trying to sort photos by name on newer F-Spot database... X-Git-Tag: phpfspot-1.2.1~1 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=18ecb83988277922d2743ace52b3ee4a74f35952 issue85, fix SQL error when trying to sort photos by name on newer F-Spot database versions --- diff --git a/phpfspot.class.php b/phpfspot.class.php index b61f516..b3ad278 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -1951,10 +1951,20 @@ class PHPFSPOT { return " ORDER BY p.time DESC"; break; case 'name_asc': - return " ORDER BY p.name ASC"; + if($this->dbver < 9) { + return " ORDER BY p.name ASC"; + } + else { + return " ORDER BY p.uri ASC"; + } break; case 'name_desc': - return " ORDER BY p.name DESC"; + if($this->dbver < 9) { + return " ORDER BY p.name DESC"; + } + else { + return " ORDER BY p.uri DESC"; + } break; }