mediawiki-extensions-Gadgets/includes
Siddharth VP bded600e36 Avoid validating gadget definition content multiple times on save
The validation appears to be occurring 4 times:
1. JsonContentHandler->preSaveTransform --> GadgetDefinitionContent->isValid
2. GadgetHooks::onEditFilterMergedContent --> GadgetDefinitionContent->validate
3. ContentHandler->validateSave --> GadgetDefinitionContent->isValid
4. RevisionStore->checkContent ---> GadgetDefinitionContent->isValid

Caching the validation result reduces it down to 2.

(Validation in GadgetHooks::onEditFilterMergedContent is to provide a more useful error message than what ContentHandler gives – which is just "Invalid content data".)

Change-Id: I026751b7e9b111b4f0bb9ab5fa0e9737a0385b07
2022-01-26 15:39:14 +05:30
..
api Allow specifying page actions in definitions 2022-01-01 00:41:08 +05:30
content Avoid validating gadget definition content multiple times on save 2022-01-26 15:39:14 +05:30
Gadget.php Allow specifying page actions in definitions 2022-01-01 00:41:08 +05:30
GadgetDefinitionNamespaceRepo.php Add edit link to gadget definition in Special:Gadgets 2021-12-31 20:42:37 -08:00
GadgetHooks.php Allow specifying page actions in definitions 2022-01-01 00:41:08 +05:30
GadgetRepo.php Add edit link to gadget definition in Special:Gadgets 2021-12-31 20:42:37 -08:00
GadgetResourceLoaderModule.php Support JSON files in gadgets 2021-12-27 17:33:21 +00:00
MediaWikiGadgetsDefinitionRepo.php Allow specifying page actions in definitions 2022-01-01 00:41:08 +05:30
SpecialGadgets.php Add edit link to gadget definition in Special:Gadgets 2021-12-31 20:42:37 -08:00
SpecialGadgetUsage.php Various code cleanup 2021-10-09 01:34:45 +01:00