From afadeef5cc359b4b3cb8372de1d2424691787807 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Mon, 31 Dec 2007 15:55:09 +0100 Subject: [PATCH] issue85, fixed order-by-photo name --- phpfspot.class.php | 4 ++-- phpfspot_db.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index b3ad278..6d3dddd 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -1955,7 +1955,7 @@ class PHPFSPOT { return " ORDER BY p.name ASC"; } else { - return " ORDER BY p.uri ASC"; + return " ORDER BY basename(p.uri) ASC"; } break; case 'name_desc': @@ -1963,7 +1963,7 @@ class PHPFSPOT { return " ORDER BY p.name DESC"; } else { - return " ORDER BY p.uri DESC"; + return " ORDER BY basename(p.uri) DESC"; } break; } diff --git a/phpfspot_db.php b/phpfspot_db.php index e9c99ce..df41e73 100644 --- a/phpfspot_db.php +++ b/phpfspot_db.php @@ -73,6 +73,7 @@ class PHPFSPOT_DB { $this->setConnStatus(false); } else { + sqlite3_create_function($this->db, 'basename', 1, 'basename'); $this->setConnStatus(true); } break; -- 2.25.1