Welcome Guest, Not a member yet? Register   Sign In
create_links() leaves Pagination object in inconsistent state
#1

[eluser]falloutphil[/eluser]
Code Igniter 1.6.1

Don't want to cross post so see:
http://ellislab.com/forums/viewthread/73039/

Suggest fix is as follows. I guess this is only a bug if CI does not forbid more than one pagination per controller. So it's either a bug or an enhancement. Either way, it's a worthwhile modification. I've tested this locally, verified the problem and checked the solution works.

See post above to demonstrate the problem.

File: Pagination.php
Function: create_links()

Immediately before returning from the function add this line:

Code:
$this->cur_page = $uri_page_number;

Without this line attempts a >1 pagination fails as the current page is corrupted by the first pagination.

I don't believe this has been reported before, so if people agree I'll add this to the bug tracker.

Phil.


Messages In This Thread
create_links() leaves Pagination object in inconsistent state - by El Forum - 03-03-2008, 04:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB