I'm finding that the default values aren't populating for the local and remote checkboxes on the settings form. It looks like the settings array is being passed in the wrong format; It should be keys of the checkboxes to be checked. Patch attached that appears to fix the issue for me.

Comments

jdschroeder created an issue. See original summary.

indigoxela’s picture

@jdschroeder - good catch.

But the settings aren't respected yet, when processing.

That's because of !in_array($location, $settings['image_locations']), which only checks for existence but not if it is set to "false".

Attached is a patch, which takes care of that, combined with your fix.

indigoxela’s picture

Patch #2 was a bit too sloppy with comparison, $location could be "unknown".

Attached is an improved patch combining jdschroeder's work and mine.

mohammed j. razem’s picture

Makes sense. Thanks @indigoxela and @jdschroeder for patch.

I'll do further tests and commit.

mohammed j. razem’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.