Skip to content

Commit

Permalink
Manually apply a fix submitted via PR bcit-ci#2012, bcit-ci#2016
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Nov 22, 2012
1 parent 7ade8b7 commit 2b24139
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions system/libraries/Pagination.php
Expand Up @@ -460,13 +460,15 @@ public function create_links()
// Unset the controll, method, old-school routing options
unset($get['c'], $get['m'], $get[$this->query_string_segment]);

if ( ! $get) $get = array();

// Put everything else onto the end
$query_string = (strpos($this->base_url, '&') !== FALSE ? '&' : '?') . http_build_query($get, '', '&');
if ( ! empty($get))
{
// Put everything else onto the end
$query_string = (strpos($this->base_url, '?') !== FALSE ? '&' : '?')
.http_build_query($get, '', '&');

// Add this after the suffix to put it into more links easily
$this->suffix .= $query_string;
// Add this after the suffix to put it into more links easily
$this->suffix .= $query_string;
}
}

// Render the "First" link
Expand Down

0 comments on commit 2b24139

Please sign in to comment.