mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-27 16:39:59 +00:00
Introducing a namespace for InputBox
This is a pre-patch for I5144fd6c54 to add a namespace for InputBox and making sure that this still works, independently of what we're doing later. Change-Id: Iaaff18b50619f490a4437be7f4d95845c8e0eedb
This commit is contained in:
parent
12c42cbae0
commit
cbead9bfbb
|
@ -20,9 +20,8 @@
|
|||
"i18n"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"InputBoxHooks": "includes/InputBoxHooks.php",
|
||||
"InputBox": "includes/InputBox.php"
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\InputBox\\": "includes/"
|
||||
},
|
||||
"ResourceModules": {
|
||||
"ext.inputBox.styles": {
|
||||
|
@ -44,7 +43,7 @@
|
|||
},
|
||||
"HookHandlers": {
|
||||
"main": {
|
||||
"class": "InputBoxHooks",
|
||||
"class": "MediaWiki\\Extension\\InputBox\\InputBoxHooks",
|
||||
"services": [
|
||||
"MainConfig"
|
||||
]
|
||||
|
|
|
@ -6,6 +6,15 @@
|
|||
* @ingroup Extensions
|
||||
*/
|
||||
|
||||
namespace MediaWiki\Extension\InputBox;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use Html;
|
||||
use Parser;
|
||||
use Sanitizer;
|
||||
use SpecialPage;
|
||||
use Xml;
|
||||
|
||||
/**
|
||||
* InputBox class
|
||||
*/
|
||||
|
|
|
@ -6,9 +6,20 @@
|
|||
* @ingroup Extensions
|
||||
*/
|
||||
|
||||
namespace MediaWiki\Extension\InputBox;
|
||||
|
||||
use Article;
|
||||
use Config;
|
||||
use MediaWiki;
|
||||
use MediaWiki\Hook\MediaWikiPerformActionHook;
|
||||
use MediaWiki\Hook\ParserFirstCallInitHook;
|
||||
use MediaWiki\SpecialPage\Hook\SpecialPageBeforeExecuteHook;
|
||||
use OutputPage;
|
||||
use Parser;
|
||||
use SpecialPage;
|
||||
use Title;
|
||||
use User;
|
||||
use WebRequest;
|
||||
|
||||
/**
|
||||
* InputBox hooks
|
||||
|
@ -37,7 +48,7 @@ class InputBoxHooks implements
|
|||
*/
|
||||
public function onParserFirstCallInit( $parser ) {
|
||||
// Register the hook with the parser
|
||||
$parser->setHook( 'inputbox', [ 'InputBoxHooks', 'render' ] );
|
||||
$parser->setHook( 'inputbox', 'MediaWiki\Extension\InputBox\InputBoxHooks::render' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue