HomePhabricator

Fix skins option to use currently displayed skin, rather than user preference

Authored by Majr on Jul 20 2016, 6:27 AM.

Description

Fix skins option to use currently displayed skin, rather than user preference

The user's preference usually reflects the displayed skin, however this isn't
true if the useskin URL query is set, or MobileFrontend is being used.

This fixes gadgets being displayed on the wrong skin when using useskin,
and allows mobile-specific gadgets (using skins=minerva).

Testing if the gadget is allowed in the current skin is split out from
isAllowed to isSkinSupported to enable a future patch showing gadgets
on preferences regardless of if they are allowed on the current skin.
Test coverage is added for both functions.

Also fixed another test which wasn't working, presumably because the placeholder
user didn't have the "read" right, so the section wasn't being kept.

Bug: T199478
Change-Id: I21febe92d54d6d0b89925f902581cc2739d824fb

Details

Committed
MajrAug 1 2018, 1:06 AM
Parents
rEGADda783907e71e: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
I21febe92d54d6d0b89925f902581cc2739d824fb