diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Pagination.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index ed9964590..5573f6407 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -203,7 +203,7 @@ class CI_Pagination { if ( ! $this->use_page_numbers) { - $this->cur_page = floor(($this->cur_page/$this->per_page) + 1); + $this->cur_page = (int) floor(($this->cur_page/$this->per_page) + 1); } // Calculate the start and end numbers. These determine @@ -231,7 +231,7 @@ class CI_Pagination { if ($this->reuse_query_string === TRUE) { $get = $CI->input->get(); - + // Unset the controll, method, old-school routing options unset($get['c'], $get['m'], $get[$this->query_string_segment]); @@ -248,9 +248,9 @@ class CI_Pagination { if ($this->first_link !== FALSE && $this->cur_page > ($this->num_links + 1)) { $first_url = ($this->first_url === '') ? $this->base_url : $this->first_url; - + // Take the general parameters, and squeeze this pagination-page attr in there for JS fw's - $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, 1); + $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, 1); $output .= $this->first_tag_open.'<a href="'.$first_url.'"'.$attributes.$this->_attr_rel('start').'>' .$this->first_link.'</a>'.$this->first_tag_close; |