aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-12-08 13:31:34 +0000
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-12-08 13:31:34 +0000
commit99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9 (patch)
tree23718e4d20c53c875111362601d4d07d2c17b644 /include
parenta007426965490fd7251cd917f1219bfc6bdf557b (diff)
parent647311db3eab87cfe15747765485df782abfa657 (diff)
downloadvolse-hubzilla-99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9.tar.gz
volse-hubzilla-99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9.tar.bz2
volse-hubzilla-99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9.zip
Merge pull request #723 from pafcu/diropts
Directory sorting as a dropdown, forum filter as checkbox, option to sor...
Diffstat (limited to 'include')
-rw-r--r--include/dir_fns.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 909005bbb..8bec974fb 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -51,13 +51,30 @@ function check_upstream_directory() {
}
function dir_sort_links() {
+ // Build urls without order and pubforums so it's easy to tack on the changed value
+ // Probably there's an easier way to do this
+ $url = 'directory?';
+ $tmp = $_REQUEST;
+ unset($tmp['order']);
+ $sorturl = $url . http_build_query($tmp);
+ $tmp = $_REQUEST;
+
+ unset($tmp['pubforums']);
+ $forumsurl = $url . http_build_query($tmp);
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
'$header' => t('Directory Options'),
'$normal' => t('Alphabetic'),
'$reverse' => t('Reverse Alphabetic'),
'$date' => t('Newest to Oldest'),
+ '$reversedate' => t('Oldest to Newest'),
'$pubforums' => t('Public Forums Only'),
+ '$pubforumsonly' => x($_REQUEST,'pubforums') ? $_REQUEST['pubforums'] : '',
+ '$sort' => t('Sort'),
+ '$selected_sort' => x($_REQUEST,'order') ? $_REQUEST['order'] : 'normal',
+ '$sorturl' => $sorturl,
+ '$forumsurl' => $forumsurl,
+
));
return $o;
}