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"
],
"SpecialPages": {
"Gadgets": "MediaWiki\\Extension\\Gadgets\\SpecialGadgets",
"GadgetUsage": "MediaWiki\\Extension\\Gadgets\\SpecialGadgetUsage"
"Gadgets": "MediaWiki\\Extension\\Gadgets\\Special\\SpecialGadgets",
"GadgetUsage": "MediaWiki\\Extension\\Gadgets\\Special\\SpecialGadgetUsage"
},
"APIListModules": {
"gadgetcategories": "MediaWiki\\Extension\\Gadgets\\Api\\ApiQueryGadgetCategories",

View file

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

View file

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

View file

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