summaryrefslogtreecommitdiffstats
path: root/system/libraries/Profiler.php
diff options
context:
space:
mode:
authorjekkos <jekkos@users.noreply.github.com>2016-01-18 21:14:06 +0100
committerAndrey Andreev <narf@devilix.net>2016-01-20 18:37:57 +0100
commit4e87bd3622b3b9edcb90d7d4792f4374daf46446 (patch)
tree36770f972d2cc09c83b8cf2c18accb80fb73d696 /system/libraries/Profiler.php
parentc70216d560d85adf907d9941868a0d8d3df868ca (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 'system/libraries/Profiler.php')
0 files changed, 0 insertions, 0 deletions