summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-01-20 18:35:28 +0100
committerAndrey Andreev <narf@devilix.net>2016-01-20 18:35:28 +0100
commit4159996fc448b70ee8454be93dd0cd77d8542828 (patch)
tree5fbe5a0cf3540ec8d1b1b32b0a29068b4e875f91
parenta062bdc6cf80268f89309d8be416cc3489e010c5 (diff)
parent356ad58b61d485570d4f4ca96fefda0d3a9c5d32 (diff)
Merge pull request #4384 from jekkos/pagination-fix
Respect $config['cur_page'] variable for pagination
-rw-r--r--system/libraries/Pagination.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index cef98ebf4..9ac9661ad 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -497,7 +497,7 @@ class CI_Pagination {
{
$this->cur_page = $this->CI->input->get($this->query_string_segment);
}
- else
+ elseif (empty($this->cur_page))
{
// Default to the last segment number if one hasn't been defined.
if ($this->uri_segment === 0)
@@ -512,6 +512,10 @@ class CI_Pagination {
{
$this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page);
}
+ }
+ else
+ {
+ $this->cur_page = (string) $this->cur_page;
}
// If something isn't quite right, back to the default base page.