mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-23 15:57:15 +00:00
Use namespace MediaWiki\Extension\WikiEditor in PHP
Change-Id: I0be9b88accafce97f7e9b7524ec740fb576fa11c
This commit is contained in:
parent
c820a43220
commit
4da6f5b3b5
|
@ -22,25 +22,25 @@
|
|||
},
|
||||
"Hooks": {
|
||||
"EditPage::showEditForm:initial": [
|
||||
"WikiEditorHooks::editPageShowEditFormInitial"
|
||||
"MediaWiki\\Extension\\WikiEditor\\Hooks::editPageShowEditFormInitial"
|
||||
],
|
||||
"GetPreferences": [
|
||||
"WikiEditorHooks::getPreferences"
|
||||
"MediaWiki\\Extension\\WikiEditor\\Hooks::getPreferences"
|
||||
],
|
||||
"EditPage::showEditForm:fields": [
|
||||
"WikiEditorHooks::editPageShowEditFormFields"
|
||||
"MediaWiki\\Extension\\WikiEditor\\Hooks::editPageShowEditFormFields"
|
||||
],
|
||||
"EditPage::attemptSave": [
|
||||
"WikiEditorHooks::editPageAttemptSave"
|
||||
"MediaWiki\\Extension\\WikiEditor\\Hooks::editPageAttemptSave"
|
||||
],
|
||||
"EditPage::attemptSave:after": [
|
||||
"WikiEditorHooks::editPageAttemptSaveAfter"
|
||||
"MediaWiki\\Extension\\WikiEditor\\Hooks::editPageAttemptSaveAfter"
|
||||
],
|
||||
"EditPageGetPreviewContent": "WikiEditorHooks"
|
||||
},
|
||||
"HookHandlers": {
|
||||
"WikiEditorHooks": {
|
||||
"class": "WikiEditorHooks"
|
||||
"class": "MediaWiki\\Extension\\WikiEditor\\Hooks"
|
||||
}
|
||||
},
|
||||
"ResourceModules": {
|
||||
|
@ -60,8 +60,8 @@
|
|||
"jquery.wikiEditor.dialogs.config.js",
|
||||
{
|
||||
"name": "data.json",
|
||||
"callback": "WikiEditorHooks::getModuleData",
|
||||
"versionCallback": "WikiEditorHooks::getModuleDataSummary"
|
||||
"callback": "MediaWiki\\Extension\\WikiEditor\\Hooks::getModuleData",
|
||||
"versionCallback": "MediaWiki\\Extension\\WikiEditor\\Hooks::getModuleDataSummary"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
|
@ -393,7 +393,8 @@
|
|||
"wikieditor-toolbar-help-content-indent-result"
|
||||
],
|
||||
"AutoloadClasses": {
|
||||
"WikiEditorHooks": "includes/WikiEditorHooks.php"
|
||||
"MediaWiki\\Extension\\WikiEditor\\Hooks": "includes/Hooks.php",
|
||||
"WikiEditorHooks": "includes/Hooks.php"
|
||||
},
|
||||
"manifest_version": 2
|
||||
}
|
||||
|
|
|
@ -6,12 +6,29 @@
|
|||
* @ingroup Extensions
|
||||
*/
|
||||
|
||||
namespace MediaWiki\Extension\WikiEditor;
|
||||
|
||||
use ApiMessage;
|
||||
use Article;
|
||||
use Config;
|
||||
use Content;
|
||||
use EditPage;
|
||||
use EventLogging;
|
||||
use ExtensionRegistry;
|
||||
use Html;
|
||||
use MediaWiki\Cache\CacheKeyHelper;
|
||||
use MediaWiki\Hook\EditPageGetPreviewContentHook;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MessageLocalizer;
|
||||
use MWCryptRand;
|
||||
use OutputPage;
|
||||
use ResourceLoaderContext;
|
||||
use Status;
|
||||
use User;
|
||||
use WebRequest;
|
||||
use WikimediaEvents\WikimediaEventsHooks;
|
||||
|
||||
class WikiEditorHooks implements EditPageGetPreviewContentHook {
|
||||
class Hooks implements EditPageGetPreviewContentHook {
|
||||
|
||||
/** @var string|bool ID used for grouping entries all of a session's entries together in EventLogging. */
|
||||
private static $statsId = false;
|
||||
|
@ -439,3 +456,9 @@ class WikiEditorHooks implements EditPageGetPreviewContentHook {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retain the old class name for backwards compatibility.
|
||||
* @deprecated since 1.38
|
||||
*/
|
||||
class_alias( Hooks::class, 'WikiEditorHooks' );
|
Loading…
Reference in a new issue