summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-12-31 15:55:09 +0100
committerAndreas Unterkircher <unki@netshadow.at>2007-12-31 15:55:09 +0100
commitafadeef5cc359b4b3cb8372de1d2424691787807 (patch)
tree469e939e238f46b83d4124f78339dfbc72b8e2d3
parent18ecb83988277922d2743ace52b3ee4a74f35952 (diff)
issue85, fixed order-by-photo namephpfspot-1.2.1
-rw-r--r--phpfspot.class.php4
-rw-r--r--phpfspot_db.php1
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;