summaryrefslogtreecommitdiff
path: root/LibertyTag.php
diff options
context:
space:
mode:
Diffstat (limited to 'LibertyTag.php')
-rwxr-xr-xLibertyTag.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/LibertyTag.php b/LibertyTag.php
index 97f34b2..22169c6 100755
--- a/LibertyTag.php
+++ b/LibertyTag.php
@@ -360,10 +360,32 @@ class LibertyTag extends LibertyBase {
$bindVars = array();
$sort_mode_prefix = 'tg';
- if( empty( $pParamHash['sort_mode'] ) ) {
+
+ $sortHash = array(
+ 'content_id_desc',
+ 'content_id_asc',
+ 'modifier_user_desc',
+ 'modifier_user_asc',
+ 'modifier_real_name_desc',
+ 'modifier_real_name_asc',
+ 'creator_user_desc',
+ 'creator_user_asc',
+ 'creator_real_name_desc',
+ 'creator_real_name_asc',
+ 'title_asc',
+ 'title_desc',
+ 'content_type_guid_asc',
+ 'content_type_guid_desc',
+ 'ip_asc',
+ 'ip_desc',
+ 'last_modified_asc',
+ 'last_modified_desc',
+ );
+
+ if( empty( $pParamHash['sort_mode'] ) || in_array( $pParamHash['sort_mode'], $sortHash ) ) {
$pParamHash['sort_mode'] = 'tag_asc';
}
-
+
/**
* @TODO this all needs to go in in some other getList type method
* and these are just sketches - need to be different kinds of queries in most cases