aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-08 21:15:36 -0500
committercash <cash.costello@gmail.com>2011-12-08 21:15:36 -0500
commitbe930396dfd7c722d9c90d8987a49823710e6717 (patch)
treea101a1d6ef895d150ec3cbafb41ff6d6a0a58d96 /views
parentcafd3b84cead11f6e9bf4222f1e28ee3cc158a7a (diff)
downloadelgg-be930396dfd7c722d9c90d8987a49823710e6717.tar.gz
elgg-be930396dfd7c722d9c90d8987a49823710e6717.tar.bz2
Fixes #4189 correctly getting the base url in pagination view
Diffstat (limited to 'views')
-rw-r--r--views/default/navigation/pagination.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php
index 4df5cf575..ad4689d83 100644
--- a/views/default/navigation/pagination.php
+++ b/views/default/navigation/pagination.php
@@ -25,7 +25,12 @@ if (!$limit = (int) elgg_extract('limit', $vars, 10)) {
$count = (int) elgg_extract('count', $vars, 0);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
-$base_url = elgg_extract('baseurl', $vars, current_page_url());
+// some views pass an empty string for base_url
+if (isset($vars['base_url']) && $vars['base_url']) {
+ $base_url = $vars['base_url'];
+} else {
+ $base_url = current_page_url();
+}
$num_pages = elgg_extract('num_pages', $vars, 10);
$delta = ceil($num_pages / 2);