Permalink
Browse files

Fixed #1817 Pagination class error

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information...
1 parent 4cfde87 commit 6b4e3624b9a33c144b3ab4aea7904d5919fcc306 @appleboy committed Sep 21, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 system/libraries/Pagination.php
@@ -215,7 +215,8 @@ public function create_links()
// 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
{

0 comments on commit 6b4e362

Please sign in to comment.