From: brettp Date: Tue, 1 Jun 2010 18:47:41 +0000 (+0000) Subject: Fixed bug in detecting and using baseurl in navingation/pagination view. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c13882f685cbad429f323808427207c4dbdef826;p=lorea%2Felgg.git 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 --- 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} ";