]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixed bug in detecting and using baseurl in navingation/pagination view.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 1 Jun 2010 18:47:41 +0000 (18:47 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 1 Jun 2010 18:47:41 +0000 (18:47 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6311 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/navigation/pagination.php

index 9dde51eeaf882b1a4e8d624f9aa6a2b67f6966f5..e208910708cd09f34b8e5c2d658d9f0298d7dd9a 100644 (file)
@@ -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 " <a href=\"{$counturl}\" class='pagination_number'>{$i}</a> ";