From f5f357060bf0ebcb0b8352519375953d993437e7 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 6 Oct 2021 14:32:49 +0000 Subject: fix alt_pager() --- include/text.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include') 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), -- cgit v1.2.3