diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/navigation/pagination.php | 2 | ||||
-rw-r--r-- | views/default/navigation/viewtype.php | 2 | ||||
-rw-r--r-- | views/default/river/item/list.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php index aec005eaf..4e0682367 100644 --- a/views/default/navigation/pagination.php +++ b/views/default/navigation/pagination.php @@ -38,7 +38,7 @@ if (isset($vars['nonefound'])) { $totalpages = ceil($count / $limit); $currentpage = ceil($offset / $limit) + 1; -$baseurl = preg_replace('/[\&\?]'.$word.'\=[0-9]*/',"",$vars['baseurl']); +$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], $word); //only display if there is content to paginate through or if we already have an offset if (($count > $limit || $offset > 0) && get_context() != 'widget') { diff --git a/views/default/navigation/viewtype.php b/views/default/navigation/viewtype.php index fcea39b61..6366ebc04 100644 --- a/views/default/navigation/viewtype.php +++ b/views/default/navigation/viewtype.php @@ -8,7 +8,7 @@ * @link http://elgg.org/ */ -$baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']); +$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], 'search_viewtype'); if ($vars['viewtype'] == "list") { $viewtype = "gallery"; diff --git a/views/default/river/item/list.php b/views/default/river/item/list.php index 9508a0da6..f9d8dd283 100644 --- a/views/default/river/item/list.php +++ b/views/default/river/item/list.php @@ -26,7 +26,7 @@ if ($vars['pagination'] !== false) { $baseurl = $_SERVER['REQUEST_URI']; - $baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl); + $baseurl = elgg_http_remove_url_query_element($baseurl, 'offset'); $nav = ''; |