? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
19 Nov 2015

Issue

Current code in JModelList->populateState is wrong for the limit and start case.

limit

In this case, the $value is cleaned properly and saved into $limit. However a bit further down the uncleaned value is stored into the states: $this->setState('list.' . $name, $value);. Obviously the cleaned value should be saved here. Which means we need to overwrite $value with the cleaned value and then also store it into $limit.

start

This case isn't needed at all. Some more lines further down this state is already handled by the following code:

$value = $app->getUserStateFromRequest($this->context . '.limitstart', 'limitstart', 0);
$limitstart = ($limit != 0 ? (floor($value / $limit) * $limit) : 0);
$this->setState('list.start', $limitstart);

Effectively overwriting the value stored in the "start" case. So I simply removed that case.

avatar Bakual Bakual - open - 19 Nov 2015
avatar Bakual Bakual - change - 19 Nov 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Nov 2015
Labels Added: ?
avatar Bakual
Bakual - comment - 19 Nov 2015

Also added integer filtering to the limitstart requesting. It isn't really needed since the value is passed through floor() afterwards but it sure doesn't hurt :smile:

avatar zero-24 zero-24 - change - 25 Nov 2015
Category Libraries
avatar Disaron Disaron - test_item - 8 Dec 2015 - Tested successfully
avatar Disaron
Disaron - comment - 8 Dec 2015

I have tested this item :white_check_mark: successfully on e93e6a5


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8498.

avatar anibalsanchez anibalsanchez - test_item - 19 Dec 2015 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 19 Dec 2015

I have tested this item :white_check_mark: successfully on e93e6a5

Pagination works OK


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8498.

avatar brianteeman brianteeman - change - 20 Jan 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 20 Jan 2016

Setting RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8498.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Jan 2016
Labels Added: ?
avatar wilsonge wilsonge - reference | 3a52dd8 - 26 Jan 16
avatar wilsonge wilsonge - merge - 26 Jan 2016
avatar wilsonge wilsonge - close - 26 Jan 2016
avatar wilsonge wilsonge - change - 26 Jan 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-01-26 23:40:00
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Jan 2016
avatar joomla-cms-bot joomla-cms-bot - close - 26 Jan 2016
avatar wilsonge wilsonge - change - 26 Jan 2016
Milestone Added:
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jan 2016
Labels Removed: ?
avatar Bakual Bakual - head_ref_deleted - 27 Jan 2016

Add a Comment

Login with GitHub to post a comment