Commit graph

12 commits

Author SHA1 Message Date
niharika29 e03ff36127 Add wgQueryPages hook for Special:GadgetUsage page
Change-Id: Ifacd705886f923e3ee58d4cd004d50c8ec4002d8
2015-10-27 13:29:26 +00:00
Kunal Mehta 152484566d Add support for 'messages' and 'hidden' gadgets
In the backend, allow:
* Adding dependencies on messages
* Marking gadgets as hidden so they don't show in preferences

These cannot be used by MediaWiki:Gadgets-definition gadgets, but will
be used by Gadgets 2.0 gadgets.

Change-Id: I55e97de9d631ae001ccc0164db172ba9c5689a34
2015-08-08 00:43:16 +00:00
Timo Tijhof 29e7a9193d Don't load legacy gadget scripts
The time has come to stop supporting legacy gadgets that haven't
migrated to ResourceLoader yet.

For many Gadgets, migrating to ResourceLoader will be as easy
as adding "[ResourceLoader]" to its definition on MediaWiki:Gadgets-definition.

However for older gadgets, they may need more maintenance. Though
similarly they may've already been malfunctioning silently.

The most common techniques used by legacy scripts, and what their
equivalents are in modern JavaScript, see:
<https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users)>

Ref T107399.

Change-Id: Ia5f7323a40a28541515ef3a3f5079f1cc940f392
2015-08-07 01:00:40 +00:00
Kunal Mehta e858bda308 Add abstract GadgetRepo and MediaWikiGadgetsDefinition implementation
GadgetRepo is an abstract class based off of the implementation in the
RL2 branch.

It is a singleton that provides basic methods to construct and interact
with Gadget objects.

The MediaWikiGadgetsDefinition class is an implementation of GadgetsRepo
that parses the "MediaWiki:Gadgets-definition" page for gadget
definitions.

Tests were left in place to demonstrate that no functional changes have
been made aside from relocation of code. Some tests should be moved to
separate files in the future.

Bug: T106176
Change-Id: I3e802889f6f495783f4dbac65c2a8cefa824a778
2015-08-01 15:10:07 -07:00
Alex Monk a51bb552dc Revert "Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy gadgets"
This reverts commit 036aa3d876.

Change-Id: I90840cbdaa1d6eabde3fffd113dc7a945a876e77
2015-07-18 07:44:31 +00:00
Kunal Mehta 036aa3d876 Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy gadgets
Follows-up 192d37b19a.

So we can turn them off in preparation of Gadgets 2.0, which
doesn't support them at all.

Change-Id: I98b4146579ccbbfcad8b83a51cc095da1fad673c
2015-07-04 01:25:26 +01:00
Alex Monk ca8880a634 Set 644 file permissions on .php files
Bug: T104039
Change-Id: I5a040819ae53ce9e4da7ed542ed1f74253129a86
2015-06-27 18:50:31 +01:00
Thiemo Mättig 5b1f8a1e50 Update api module constructors
This also replaces a deprecated function and adds some code docs.

Change-Id: I22c77d370469c10cad5d504b06280e933eeeeeff
2015-06-17 20:42:20 +02:00
Aaron Schulz 11e1c51d6b Conversion to using WAN cache
* Bumped the key version due to key wrapping
* Removed isValidList() gived the key versioning
* Follow up ba1311c323 by making APC viable;
  previously, definition purges would not work

Bug: T93141
Change-Id: I6da3eede044bf4b840b3f9656a1ae8105941dc6b
2015-05-23 23:04:06 +00:00
Chad Horohoe fb5c2ba40e Remove obvious function-level profiling
Change-Id: If6ce3558357a64ce5054a40e493d65a07956f471
2015-02-12 11:48:44 -08:00
Max Semenik 0a1a4f4438 Profiling
Change-Id: I4988e95e953f55bc96779c4fcc7d94553d5b3b0c
2013-08-30 03:43:17 +04:00
Max Semenik 0ee165bce8 Move hooks to a separate file
Change-Id: I2cb53bd4beae247c1b983dc8c4482af682acab64
2013-08-30 03:35:07 +04:00