Namespace special page classes

Change-Id: I005f6674c9cc80c5c9e26ae84acfbceebb43734e
This commit is contained in:
Siddharth VP 2023-10-30 21:06:33 +05:30
parent 319d422398
commit a7309d2b1f
4 changed files with 9 additions and 5 deletions

View file

@ -46,8 +46,8 @@
"gadgets-definition-edit" "gadgets-definition-edit"
], ],
"SpecialPages": { "SpecialPages": {
"Gadgets": "MediaWiki\\Extension\\Gadgets\\SpecialGadgets", "Gadgets": "MediaWiki\\Extension\\Gadgets\\Special\\SpecialGadgets",
"GadgetUsage": "MediaWiki\\Extension\\Gadgets\\SpecialGadgetUsage" "GadgetUsage": "MediaWiki\\Extension\\Gadgets\\Special\\SpecialGadgetUsage"
}, },
"APIListModules": { "APIListModules": {
"gadgetcategories": "MediaWiki\\Extension\\Gadgets\\Api\\ApiQueryGadgetCategories", "gadgetcategories": "MediaWiki\\Extension\\Gadgets\\Api\\ApiQueryGadgetCategories",

View file

@ -31,6 +31,7 @@ use IContextSource;
use InvalidArgumentException; use InvalidArgumentException;
use ManualLogEntry; use ManualLogEntry;
use MediaWiki\Extension\Gadgets\Content\GadgetDefinitionContent; use MediaWiki\Extension\Gadgets\Content\GadgetDefinitionContent;
use MediaWiki\Extension\Gadgets\Special\SpecialGadgetUsage;
use MediaWiki\Hook\BeforePageDisplayHook; use MediaWiki\Hook\BeforePageDisplayHook;
use MediaWiki\Hook\DeleteUnknownPreferencesHook; use MediaWiki\Hook\DeleteUnknownPreferencesHook;
use MediaWiki\Hook\EditFilterMergedContentHook; use MediaWiki\Hook\EditFilterMergedContentHook;
@ -420,7 +421,7 @@ class Hooks implements
* @param array &$queryPages * @param array &$queryPages
*/ */
public function onWgQueryPages( &$queryPages ) { public function onWgQueryPages( &$queryPages ) {
$queryPages[] = [ 'SpecialGadgetUsage', 'GadgetUsage' ]; $queryPages[] = [ SpecialGadgetUsage::class, 'GadgetUsage' ];
} }
/** /**

View file

@ -24,9 +24,10 @@
* @author Niharika Kohli <niharika@wikimedia.org> * @author Niharika Kohli <niharika@wikimedia.org>
*/ */
namespace MediaWiki\Extension\Gadgets; namespace MediaWiki\Extension\Gadgets\Special;
use Html; use Html;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use OutputPage; use OutputPage;
use QueryPage; use QueryPage;
use Skin; use Skin;

View file

@ -9,11 +9,13 @@
* @license GPL-2.0-or-later * @license GPL-2.0-or-later
*/ */
namespace MediaWiki\Extension\Gadgets; namespace MediaWiki\Extension\Gadgets\Special;
use Html; use Html;
use HTMLForm; use HTMLForm;
use InvalidArgumentException; use InvalidArgumentException;
use MediaWiki\Extension\Gadgets\Gadget;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use Sanitizer; use Sanitizer;