Commit graph

5 commits

Author SHA1 Message Date
Matt Russell b340532c52 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
2018-08-01 11:06:17 +10:00
Kunal Mehta c383794d16 Fix variable name reuse in EditFilterMergedContent hook
Bug: T194695
Change-Id: Ic99e35874f1a3a4a7c1d1c302294bbecd23080ed
2018-05-14 17:11:58 -07:00
Sam Wilson 97c5bd7732 Prevent gadget preferences from being cleaned up
Bug: T188966
Change-Id: I5627f014827fdbf266eb7fdb00a446f81a0c3458
2018-04-06 20:06:11 +00:00
Kunal Mehta e99e181303 Add phan configuration
Depends-On: I09a0c0a786b687997e61344847f8af08b20cebf2
Change-Id: I9500232fb524e884d6cb15f2bdda10835df35ad4
2018-02-26 12:57:40 -08:00
Kunal Mehta 677d4e932c Move classes into includes/
Change-Id: I10bc5234ad2ebeed2514aafc3dbe2a0afa983bd8
2018-02-25 11:19:23 +00:00
Renamed from GadgetHooks.php (Browse further)