summaryrefslogtreecommitdiffstats
path: root/composer.json
diff options
context:
space:
mode:
authorjekkos <jekkos@users.noreply.github.com>2016-01-18 21:14:06 +0100
committerjekkos <jeroen.peelaerts@gmail.com>2016-01-20 18:30:39 +0100
commit356ad58b61d485570d4f4ca96fefda0d3a9c5d32 (patch)
tree78d9671dd610742dfd5fe48c198c92622f4bb521 /composer.json
parente5563f8a1d939666b70b2deac10b0e368f6de2e5 (diff)
Respect $config['cur_page'] variable for pagination
After upgrading to CI3 I noticed that developers are able to determine the current page counter for pagination based on * Explicit query string parameters * URI segment configuration In earlier versions a developer could still set the current page counter in the pagination lib directly which is useful if you want to use pagination with HTTP POST instead of GET. This could be done by passing $config['cur_page'] = '10'; to the pagination function for link generation. Currently this code has changed and will always try to check whether the uri segment is a valid number or not, even if the cur_page variable was passed in the associative array, and fallback to zero if it fails to validate that result. This can be easily resolved by checking whether the counter was already set with a valid number from the $config array before trying to resolve it from the uri segment. This fix give a developer more flexibility and stop CI from overwriting the externally set value with an incorrect one. Signed-off-by: jekkos <jeroen.peelaerts@gmail.com>
Diffstat (limited to 'composer.json')
0 files changed, 0 insertions, 0 deletions