Commit graph

27 commits

Author SHA1 Message Date
DannyS712 a7f35df800 extension.json - don't use array for hooks with one handler
Change-Id: Ic1ba01c4734a6235a38fb45db85b463d0d724e4d
2020-03-01 08:43:19 +00:00
zoranzoki21 53de932571 Move all apihelp translatable messages to separate files
Bug: T189982
Change-Id: Ifc682634d8403401e2ca4667e34474ed08574f53
2019-01-29 17:11:32 +00:00
James D. Forrester ee4973ebfa Mark MediaWiki:Gadgets-definition as a raw HTML message
Bug: T200997
Depends-On: Ib16db04e499ad28216ee08b8cccccf3f141e2bad
Change-Id: I4a01bfb6f89c0f4e137feda7cf5551f970fc6905
2018-08-27 10:38:31 -07:00
Fomafix b6e7bcf015 Use ContentLanguage service instead of global $wgContLang
This change raises MediaWiki version requirement to 1.32.

Change-Id: Ieffed829bf5a8e1f138fd5f63518e415cebb1287
Depends-On: I193f5b9a95430b0a05573c361715e053e5411e32
2018-08-05 00:52:53 +02: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 677d4e932c Move classes into includes/
Change-Id: I10bc5234ad2ebeed2514aafc3dbe2a0afa983bd8
2018-02-25 11:19:23 +00:00
Kunal Mehta f04d09e0d9 Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: I94d4d2b21bdbbc12e1a34c1373a631e03ac2df93
2018-01-31 23:05:41 -08:00
Matěj Suchánek 1d60e9f74f Replace Linker::link() with LinkRenderer
This raises MediaWiki version requirement to 1.28.0.

Bug: T149346
Change-Id: I90117382215c0e7962f2d4a4fa275898beab9816
2017-03-18 09:14:45 +00:00
Reedy 7c922c92b9 Replace ArticleSaveComplete hook usage
Bug: T147556
Change-Id: I6f3a58c8e7cf1382fc8e1ac30cc697deb7fc9eb7
2016-10-06 17:16:15 +01:00
Reedy 34795a8803 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I89cfc1ea3e652ebec1cd67f62810586c4ef49574
2016-08-06 01:14:53 -07:00
niharika29 75ae3558e7 Add a feature flag to turn off the 'active users' query on GadgetUsage
Currently takes >24 hours to complete on enwiki and thus isn't run
at all. Need a better optimised query. Until that happens, we can
turn it off on enwiki.

Bug: T121484
Change-Id: Idcf2a8a1cdf5ce4c2f6a631ef980be5a48ca547b
2015-12-18 19:30:45 +00:00
Kunal Mehta 519f30355e Implement Gadgets definition namespace repo
Implements:
* Gadget definition content and content handler
* Basic validation for gadget definition content
* GadgetDefinitionNamespace implementation of GadgetRepo
* DataUpdates upon editing/deletion of Gadget definition pages
* EditFilterMerged hook for improved error messages
* 'GadgetsRepoClass' option to switch GadgetRepo implementation used
* Lazy-load the GadgetResourceLoaderModule class so we don't need to
load each individual gadget object unless its needed

Note that Special:Gadgets's export feature intentionally doesn't work
yet, and will be fixed in a follow up patch.

Bug: T106177
Change-Id: Ib11db5fb0f7b46793bfa956cf1367f1dc1059b1c
2015-11-20 12:01:21 -06:00
niharika29 e03ff36127 Add wgQueryPages hook for Special:GadgetUsage page
Change-Id: Ifacd705886f923e3ee58d4cd004d50c8ec4002d8
2015-10-27 13:29:26 +00:00
niharika29 be8091a288 Add a special page to show number of users for each gadget on the wiki
Bug: T115152
Change-Id: Id1e245f8fdb2fc6a764682ae34937f35af24bd7c
2015-10-23 15:02:23 +00:00
Southparkfan dbecdaee62 chmod 644 for php and json files
Bug: T111743
Change-Id: I3ebc7c05f4a598a702cbd2948147dade3323e994
2015-09-08 18:06:35 +02:00
Kunal Mehta e6b8b57d9b Set up "Gadget" and "Gadget definition" namespaces
Register the "Gadget", "Gadget definition", and their respective talk
namespaces. It will not be possible to create any pages in the Gadget
and Gadget definition namespaces due to the "gadgets-edit" and "gadgets-
definition-edit" rights not being granted to any groups.

Depends on Iaf8b44d02adf9 in MediaWiki core.

Change-Id: Ia88c774cc0decc252a4a4277d14822048db95801
2015-08-08 01:39:56 -07:00
Kunal Mehta 3d270b36bf Remove ConfigRegistry entry for gadgets
It no longer has any configuration settings, so it doesn't need to
registery a Config type.

Change-Id: Icd0f759ca4e58b1436bfcd2403a38e1691d3bc39
2015-08-01 15:10:20 -07:00
Kunal Mehta adcb193a1b Move GadgetResourceLoaderModule class to separate file
Change-Id: Ic7dde135168a04fc5916e5f44acd6b8639c8ce1a
2015-08-01 15:10:15 -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
Aaron Schulz 2bd2ef99c5 Removed caching config variables and always enable caching
* APC will be used if around as a tier 1 cache
* This also makes it easier to have mixed zend/hhvm servers

Bug: T106743
Change-Id: Ie9f234753f78215441474dddc4eadedbd2b76ad7
2015-07-23 15:26:06 -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
Kunal Mehta 2c03c5203e Set manifest_version in extension.json
Bug: T100745
Change-Id: I9b0e0b774be8396399043109d68b1e1294ced9a7
2015-05-28 20:39:10 -07:00
umherirrender 6c25618f55 Replace deprecated $wgSpecialPageGroups
$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Change-Id: I3fe4906a422fdf7f6d8ba51b39b7f45c01c3d772
2015-05-15 21:55:50 +02:00
Ori Livneh ba1311c323 Make the ObjectCache implementation used for Gadget def's configurable
Add a configuration option, 'GadgetsCacheType', which may be used to specify
the ObjectCache type to use for gadget definitions.

Change-Id: I1e02f7b6c470c5fffa014c6247c71f43a69420b6
2015-05-11 18:17:36 -07:00
Kunal Mehta 083aea8580 Remove unused i18n shim
Change-Id: I3fa71465277a3119c5deca86668a0128ac78caba
2015-05-01 21:58:14 -07:00
paladox f9a55554ee Add extension.json, empty PHP entry point
Bug: T87918
Change-Id: Iacd056781823bd73144c5fa09cd884ee8e9cf0d4
2015-05-01 21:56:54 -07:00