aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-07-07 22:48:01 +0200
committerMario Vavti <mario@mariovavti.com>2015-07-07 22:48:01 +0200
commitf6cf992aee86e69d1ea5790c22d4af40c266d79e (patch)
treeb8a87e0be295acbfced5c994629859170cb14269
parentf67d9d59afea32a90ea546163da25e36cc4ad9fb (diff)
downloadvolse-hubzilla-f6cf992aee86e69d1ea5790c22d4af40c266d79e.tar.gz
volse-hubzilla-f6cf992aee86e69d1ea5790c22d4af40c266d79e.tar.bz2
volse-hubzilla-f6cf992aee86e69d1ea5790c22d4af40c266d79e.zip
fix sorting of channel suggestions
-rw-r--r--include/dir_fns.php2
-rw-r--r--mod/directory.php1
-rwxr-xr-xview/tpl/directory_header.tpl8
3 files changed, 6 insertions, 5 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 29f33f46e..be8175d06 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -120,7 +120,7 @@ function dir_sort_links() {
unset($tmp['safe']);
unset($tmp['q']);
unset($tmp['f']);
- $forumsurl = $url . $suggest . http_build_query($tmp);
+ $forumsurl = $url . http_build_query($tmp) . $suggest;
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
'$header' => t('Directory Options'),
diff --git a/mod/directory.php b/mod/directory.php
index ff892d381..44d80cff1 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -388,6 +388,7 @@ function directory_content(&$a) {
'$reverse' => t('Reverse Alphabetic'),
'$date' => t('Newest to Oldest'),
'$reversedate' => t('Oldest to Newest'),
+ '$suggest' => $suggest ? '&suggest=1' : ''
));
diff --git a/view/tpl/directory_header.tpl b/view/tpl/directory_header.tpl
index 25a9b8279..79598fc9a 100755
--- a/view/tpl/directory_header.tpl
+++ b/view/tpl/directory_header.tpl
@@ -5,10 +5,10 @@
<i class="icon-sort"></i>
</button>
<ul class="dropdown-menu">
- <li><a href="directory?f=&order=date">{{$date}}</a></li>
- <li><a href="directory?f=&order=normal">{{$normal}}</a></li>
- <li><a href="directory?f=&order=reversedate">{{$reversedate}}</a></li>
- <li><a href="directory?f=&order=reverse">{{$reverse}}</a></li>
+ <li><a href="directory?f=&order=date{{$suggest}}">{{$date}}</a></li>
+ <li><a href="directory?f=&order=normal{{$suggest}}">{{$normal}}</a></li>
+ <li><a href="directory?f=&order=reversedate{{$suggest}}">{{$reversedate}}</a></li>
+ <li><a href="directory?f=&order=reverse{{$suggest}}">{{$reverse}}</a></li>
</ul>
</div>
<h2>{{$dirlbl}}{{if $search}}:&nbsp;{{$safetxt}}{{/if}}</h2>