aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-06 14:32:49 +0000
committerMario <mario@mariovavti.com>2021-10-06 14:32:49 +0000
commitf5f357060bf0ebcb0b8352519375953d993437e7 (patch)
tree71295c0103b21ffbad2b5cb5eb0c9950ca92e0f3
parent98eea41865b3488d5adf0cfa68d0d32973ca1cb5 (diff)
downloadvolse-hubzilla-f5f357060bf0ebcb0b8352519375953d993437e7.tar.gz
volse-hubzilla-f5f357060bf0ebcb0b8352519375953d993437e7.tar.bz2
volse-hubzilla-f5f357060bf0ebcb0b8352519375953d993437e7.zip
fix alt_pager()
-rw-r--r--include/text.php6
-rw-r--r--view/tpl/alt_pager.tpl4
2 files changed, 3 insertions, 7 deletions
diff --git a/include/text.php b/include/text.php
index 7e1dd13c4..1b3a77dba 100644
--- a/include/text.php
+++ b/include/text.php
@@ -577,11 +577,7 @@ function alt_pager($i, $more = '', $less = '') {
if(! $less)
$less = t('newer');
- $stripped = preg_replace('/(&page=[0-9]*)/','',App::$query_string);
- $stripped = str_replace('q=','',$stripped);
- $stripped = trim($stripped,'/');
- //$pagenum = App::$pager['page'];
- $url = z_root() . '/' . $stripped;
+ $url = z_root() . '/' . drop_query_params(App::$query_string, ['page', 'q']);
return replace_macros(get_markup_template('alt_pager.tpl'), array(
'$has_less' => ((App::$pager['page'] > 1) ? true : false),
diff --git a/view/tpl/alt_pager.tpl b/view/tpl/alt_pager.tpl
index b46dc7662..94fa93401 100644
--- a/view/tpl/alt_pager.tpl
+++ b/view/tpl/alt_pager.tpl
@@ -1,4 +1,4 @@
<div class="pager">
-{{if $has_less}}<a href="{{$url}}&page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}}
-{{if $has_more}}{{if $has_less}}&nbsp;|&nbsp;{{/if}}<a href="{{$url}}&page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}}
+{{if $has_less}}<a href="{{$url}}?page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}}
+{{if $has_more}}{{if $has_less}}&nbsp;|&nbsp;{{/if}}<a href="{{$url}}?page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}}
</div>