Pagination Bug - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Pagination Bug (/showthread.php?tid=45819) |
Pagination Bug - El Forum - 10-07-2011 [eluser]zenixgrace[/eluser] I Don't exactly sure is a bug or not i use CI v2.0.2 i got some issue wen't pass query_string minus value seem like the digit links is not show in my page example : i have a 12 rows and my configuration per_page is 4 i pass url like that http://localhost/CI/test/index/-1 or whatever that have a minus value i got link like that < > (Just Only Prev and Next link show) i try to fix pagination library code like that search that code like that Code: if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE) replace with that Code: if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE) i also get an issue wen't i pass query_string value is my last record row example : i have 12 row in database my configuration is like that : $config['base_url'] = site_url('test/index'); $config['total_rows'] = $this->testmodel->count_all(); $config['per_page'] = 4; $this->pagination->initialize($config); when i pass a url like that http://localhost/CI/test/index/12 i got link like that First < 2 3 i think it's should like that < 1 2 3 because the default num_link is 2 i try to fix pagination library code like that search that code like that Code: if ($this->cur_page > $this->total_rows) replace with that Code: if ($this->cur_page >= $this->total_rows) i don't exactly sure that the best way or not may be someone can explain / fixed that with better ways.. Correct Me If I'm Wrong (CMIIW) |