Merge "Namespace special page classes"

This commit is contained in:
jenkins-bot 2023-10-30 18:42:37 +00:00 committed by Gerrit Code Review
commit 1ebcbafc89
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;