aboutsummaryrefslogtreecommitdiffstats
path: root/include/dir_fns.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-10 16:26:36 -0800
committerfriendica <info@friendica.com>2014-12-10 16:26:36 -0800
commit7f1a42340a3f0967e23cf836b2c417a1b9b9b20b (patch)
tree27627ee92feb7ac5c16fcb1214f0819d2f68c653 /include/dir_fns.php
parent58067c24fc5200993539af6d7f7254877662c3c9 (diff)
parentc91aa863d85e6d3b3a260fefe5e281d66730c4c9 (diff)
downloadvolse-hubzilla-7f1a42340a3f0967e23cf836b2c417a1b9b9b20b.tar.gz
volse-hubzilla-7f1a42340a3f0967e23cf836b2c417a1b9b9b20b.tar.bz2
volse-hubzilla-7f1a42340a3f0967e23cf836b2c417a1b9b9b20b.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'include/dir_fns.php')
-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;
}