Commit graph

17 commits

Author SHA1 Message Date
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