]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #1507: $vars['baseurl'] used instead of undefined $baseurl in pagination view.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 11 Feb 2010 21:14:18 +0000 (21:14 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 11 Feb 2010 21:14:18 +0000 (21:14 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3931 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/navigation/pagination.php

index 0512aada18272bcf91d8ce4f432077454ae88d2a..11dfd0e860ff73c072c701933fa132dfbaf17b37 100644 (file)
@@ -38,8 +38,6 @@ if (isset($vars['nonefound'])) {
 $totalpages = ceil($count / $limit);
 $currentpage = ceil($offset / $limit) + 1;
 
-//$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') {
 
@@ -55,7 +53,7 @@ if (($count > $limit || $offset > 0) && get_context() != 'widget') {
                        $prevoffset = 0;
                }
 
-               $prevurl = elgg_http_add_url_query_elements($baseurl, array($word => $prevoffset));
+               $prevurl = elgg_http_add_url_query_elements($vars['baseurl'], array($word => $prevoffset));
 
                echo "<a href=\"{$prevurl}\" class=\"pagination_previous\">&laquo; ". elgg_echo("previous") ."</a> ";
        }
@@ -95,7 +93,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($vars['baseurl'], array($word => $curoffset));
 
                        if ($curoffset != $offset) {
                                echo " <a href=\"{$counturl}\" class=\"pagination_number\">{$i}</a> ";
@@ -114,7 +112,7 @@ if (($count > $limit || $offset > 0) && get_context() != 'widget') {
                        $nextoffset--;
                }
 
-               $nexturl = elgg_http_add_url_query_elements($baseurl, array($word => $nextoffset));
+               $nexturl = elgg_http_add_url_query_elements($vars['baseurl'], array($word => $nextoffset));
 
                echo " <a href=\"{$nexturl}\" class=\"pagination_next\">" . elgg_echo("next") . " &raquo;</a>";