summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2012-01-04 06:06:36 +0100
committerEric Barnes <eric@ericlbarnes.com>2012-01-04 06:06:36 +0100
commit8d727f14446f31d919e808e3833d252ef12cf1ae (patch)
treedfdc6e76905d03e5c6cc6a874092af2de40c505f
parent26cba2ae6c47ecbacdf34fe94a32f1f00fbef72c (diff)
Fixed prefix and suffix in pagination. Fixes #677
-rw-r--r--system/libraries/Pagination.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 23ca549e2..2fe4cf31b 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -142,6 +142,11 @@ class CI_Pagination {
// Determine the current page number.
$CI =& get_instance();
+ if ($this->prefix != '' OR $this->suffix != '')
+ {
+ $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $CI->uri->segment($this->uri_segment));
+ }
+
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
if ($CI->input->get($this->query_string_segment) != $base_page)