From c13882f685cbad429f323808427207c4dbdef826 Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 1 Jun 2010 18:47:41 +0000 Subject: Fixed bug in detecting and using baseurl in navingation/pagination view. git-svn-id: http://code.elgg.org/elgg/trunk@6311 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/pagination.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views/default/navigation/pagination.php') diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php index 9dde51eea..e20891070 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 = elgg_http_remove_url_query_element($vars['baseurl'], $word); +$baseurl = isset($vars['baseurl']) ? $vars['baseurl'] : current_page_url(); //only display if there is content to paginate through or if we already have an offset if (($count > $limit || $offset > 0) && get_context() != 'widget') { @@ -95,7 +95,7 @@ if (($count > $limit || $offset > 0) && get_context() != 'widget') { } $curoffset = (($i - 1) * $limit); - $counturl = elgg_http_add_url_query_elements($base_url, array($word => $curoffset)); + $counturl = elgg_http_add_url_query_elements($baseurl, array($word => $curoffset)); if ($curoffset != $offset) { echo " {$i} "; -- cgit v1.2.3