? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
30 May 2018

Pull Request for Issue # .

Summary of Changes

This sets up ModuleHelper to allow integer owncache value. This is needed in case integer filter is applied to the field in module manifest file.

Testing Instructions

Code review.

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 30 May 2018
avatar SharkyKZ SharkyKZ - change - 30 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 May 2018
Category Libraries
avatar Quy
Quy - comment - 30 May 2018

Will this work also?

$moduleparams->get('owncache') == 0

avatar SharkyKZ
SharkyKZ - comment - 30 May 2018

No. But $moduleparams->get('owncache', 1) == 0 would.

avatar mbabker
mbabker - comment - 30 May 2018

The loose comparison will allow any falsy value to pass. Anything in array('0', 0, null, false) would qualify. Because our parameter typing in core is so weak (pretty much everything is a string because we have no ORM to do type conversion on DB results and unless you explicitly set filters in form configs values are strings), you still have to be a bit careful about what places you allow loose comparisons and what places you can safely make strict comparisons.

So for me, this patch is fine as is. It looks like we're looking for an explicit "turn this off" config value, so we should be strict on what gets accepted (so I wouldn't let a "param value is null" condition pass here, which a loose comparison would do).

avatar SharkyKZ
SharkyKZ - comment - 30 May 2018

Setting a fallback would prevent null and empty string to pass.

avatar Quy Quy - test_item - 19 Jun 2018 - Tested successfully
avatar Quy
Quy - comment - 19 Jun 2018

I have tested this item successfully on 34c7ff9


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

avatar carlitorweb carlitorweb - test_item - 19 Jun 2018 - Tested successfully
avatar carlitorweb
carlitorweb - comment - 19 Jun 2018

I have tested this item successfully on 34c7ff9


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jun 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jun 2018

Ready to Commit after two successful tests.

avatar mbabker mbabker - change - 20 Jun 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-06-20 00:32:09
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 20 Jun 2018
avatar mbabker mbabker - merge - 20 Jun 2018

Add a Comment

Login with GitHub to post a comment