diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-31 00:00:43 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-31 00:00:43 +0000 |
commit | e3d22584664b28d31aa138f7b82554694254aae2 (patch) | |
tree | 2b300cceed68ad9a4bb4bb78bf029f393b8512b3 /views/default/navigation | |
parent | f5f185ddd307d218cbfab4dd53ec540caf54205e (diff) | |
download | elgg-e3d22584664b28d31aa138f7b82554694254aae2.tar.gz elgg-e3d22584664b28d31aa138f7b82554694254aae2.tar.bz2 |
Fixes #959: Added elgg_http_remove_url_query_element() to remove a GET element instead of using faulty regexp.
git-svn-id: http://code.elgg.org/elgg/trunk@3866 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation')
-rw-r--r-- | views/default/navigation/pagination.php | 2 | ||||
-rw-r--r-- | views/default/navigation/viewtype.php | 2 |
2 files changed, 2 insertions, 2 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"; |