Commit graph

8 commits

Author SHA1 Message Date
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
Kunal Mehta ee17259501 Remove deprecated API functions
MediaWiki 1.25 has been required since the switch to extension
registration.

Change-Id: I0992a32013389e82ccf7821fa077bdbb87ca880c
2015-08-01 15:10:25 -07: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
Ricordisamoa d072ac25a0 API: set 'legacyscripts' to whether a gadget includes non-ResourceLoader JS
Change-Id: I0b7e01b5164b564e1406c0dd05be67b0610dbe96
2015-06-27 02:53:26 +02: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
Brad Jorsch 48c47e1cf0 Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-10-29 16:37:38 -04:00
umherirrender 69d298509b Remove galanguage from list=gadgets
The language is unused in the api module and has no param description.

Change-Id: I08f64684415dafbd4b13dc7aab511aed6d5e3e0e
2014-06-07 07:47:40 +02:00
umherirrender 3f3deb1410 Move api files to a new api folder
Change-Id: I365ead76b11f1906c698a6058f0ef376180e1af9
2014-06-06 19:13:10 +02:00
Renamed from ApiQueryGadgets.php (Browse further)