summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2012-09-21 07:57:24 +0200
committerBo-Yi Wu <appleboy.tw@gmail.com>2012-09-21 07:57:24 +0200
commit6b4e3624b9a33c144b3ab4aea7904d5919fcc306 (patch)
tree12838a4344d19f745e560132bcb3dbe8eab8915b /system
parent4cfde87eb65a28d03e3f02be634a96aedd79dae2 (diff)
Fixed #1817 Pagination class error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Pagination.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 4fa605ca9..e1e729bb0 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -215,7 +215,8 @@ class CI_Pagination {
// string. If post, add a trailing slash to the base URL if needed
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
- $this->base_url = rtrim($this->base_url).'&amp;'.$this->query_string_segment.'=';
+ $segment = (strpos($this->base_url, '?')) ? '&amp;' : '?';
+ $this->base_url = rtrim($this->base_url).$segment.$this->query_string_segment.'=';
}
else
{