I've had two issues with Pagination.php library. I'm not quite sure if it's my fault or a bug:
First. If I use page numbers in my url, I have to change Pagination class so it does not apply the function "ceil". Otherwise my last page would be out of total number of rows range:
$num_pages = $this->use_page_numbers === TRUE ? (int) ($this->total_rows / $this->per_page) :
(int) ceil($this->total_rows / $this->per_page);
Second: If I want to use uri_to_assoc when processing my http-request I have to make a modification en the Pagination class so it understands my array in url segments:
public $uri_to_assoc = TRUE;
public $base_seg = 3;
elseif ($this->uri_to_assoc === TRUE)
{
$assoc = $this->CI->uri->uri_to_assoc($this->base_seg);
$this->cur_page = isset($assoc['page']) ? $assoc['page'] : '';
}
¿Is there any better method?. Thanks.