- Always define gadget enable/disable preferences
- Show a gadget's preference when it can be enabled
Bug: T341421
Change-Id: If32eecebccf2c9b557d7dde273b7faf7118a7ac3
The test uses black magic to override the behaviour of
MediaWikiGadgetsDefinitionRepo. However, this magic doesn't work well
with I2ac659a4, which disabled gadget loading in non-database tests.
This test is the only one that needs that code to be run, although it
won't actually make any queries because of said black magic.
Add the test to the Database group as a temporary (TM) workaround to
replacing the TestingAccessWrapper magic with something else.
Change-Id: I7d9fd612dd685a5728d3a7a9ced97fd5ac45f491
Easier to translate
There is no visible change on Special:ApiHelp/query+gadgets
Also split for list=gadgetcategories&gcprop=
Visible on Special:ApiHelp/query+gadgetcategories
Bug: T285545
Change-Id: Ic40326cd747ffe2153cff7d10e0083bd5e51345e
This method is possibly the main cause of DB access in non-database
tests, because it's called from the UserGetDefaultOptions hook handler,
which is triggered by most tests using UserOptionsLookup in any way.
Trying to obtain a DB connection will throw an exception in I96ecf9ff,
so just skip the lookup altogether.
Bug: T155147
Change-Id: I2ac659a472655b2a95e64dcbd3f709e465839b33
TestUser needs a database connection to create the User, but this test
doesn't need a real user, so just use a mock instead.
Ideally we'd use Authority, but the hook still takes a User object.
Change-Id: If6cb7e3756036fc458a4308b06499c4bc0d3d9b0
The ResourceLoader module associated with the gadget will have
mobile and desktop targets, but this allows gadgets to disable
themselves on the mobile site if necessary by not adding the gadget
to the page if it's been marked as such.
This also has the benefit of not showing the gadget on the preferences
page if it's not relevant.
Bug: T328610
Change-Id: I4f2b57d1d22f641ff7520358a46cd0e6b2103aa9
No longer used since 1.33
Automatically removed message keys with "doc-apihelp-description" in qqq
Bug: T340253
Change-Id: Iea496e743506a71608ec7adaf26364fef29678fc
Cache array representation of the Gadget object instead of the
php-serialized representation. Gadget::toArray() is an inverse of the
constructor which already constructs an object from an array of config
values.
Also, the static Gadget::newFromDefinitionContent method which accesses
the service container is replaced with the dependency-less
serializeDefinition() method.
Bug: T303194
Change-Id: Ieae6706537143d766777b2299c31726e2a1dfd29
The class is deprecated and RL will likely stop using it. And even then, this method shouldn't care. The exception is unchecked, so whatever its type is, it's just an implementation detail.
Bug: T328220
Change-Id: I3c87a376ce1d36f4a1d81a435bbc015199c75913