summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--phpfspot.class.php10
2 files changed, 10 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 790640a..19f0c5c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,7 @@ phpfspot (1.3)
* fix for PDO sqlite when trying to fetch one single row (contributed by
Arun Persaud).
* fix for incorrect SQL query (contributed by Arun Persaud).
+ * new sort order which will group photos by tag-names (alphabetical).
-- Andreas Unterkircher <unki@netshadow.at> Sat, 12 Jan 2008 11:00:00 +0100
diff --git a/phpfspot.class.php b/phpfspot.class.php
index c06ef24..329371f 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -53,7 +53,9 @@ class PHPFSPOT {
'date_asc' => 'Date &uarr;',
'date_desc' => 'Date &darr;',
'name_asc' => 'Name &uarr;',
- 'name_desc' => 'Name &darr;'
+ 'name_desc' => 'Name &darr;',
+ 'tags_asc' => 'Tags &uarr;',
+ 'tags_desc' => 'Tags &darr;',
);
/* Check necessary requirements */
@@ -2022,6 +2024,12 @@ class PHPFSPOT {
return " ORDER BY basename(p.uri) DESC";
}
break;
+ case 'tags_asc':
+ return " ORDER BY t.name ASC ,p.time ASC";
+ break;
+ case 'tags_desc':
+ return " ORDER BY t.name DESC ,p.time ASC";
+ break;
}
} // get_sort_order()