From 7bb88756964453fc3d66ce8027a59698eab7ad4c Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 14 Mar 2021 05:06:15 +0000 Subject: [PATCH] Namespace extension Change-Id: Ia510f65e739d21bcfd6072c82859109d05cf5dd1 --- extension.json | 16 +++++++--------- includes/{InterwikiHooks.php => Hooks.php} | 10 +++++++--- includes/InterwikiLogFormatter.php | 5 +++++ includes/SpecialInterwiki.php | 14 ++++++++++++-- 4 files changed, 31 insertions(+), 14 deletions(-) rename includes/{InterwikiHooks.php => Hooks.php} (94%) diff --git a/extension.json b/extension.json index 5e981d61..f076ae73 100644 --- a/extension.json +++ b/extension.json @@ -40,8 +40,8 @@ ] }, "Hooks": { - "InterwikiLoadPrefix": "InterwikiHooks::onInterwikiLoadPrefix", - "UserGetAllRights": "InterwikiHooks::onUserGetAllRights" + "InterwikiLoadPrefix": "MediaWiki\\Extension\\Interwiki\\Hooks::onInterwikiLoadPrefix", + "UserGetAllRights": "MediaWiki\\Extension\\Interwiki\\Hooks::onUserGetAllRights" }, "ResourceModules": { "ext.interwiki.specialpage": { @@ -53,18 +53,16 @@ "remoteExtPath": "Interwiki/modules" }, "SpecialPages": { - "Interwiki": "SpecialInterwiki" + "Interwiki": "MediaWiki\\Extension\\Interwiki\\SpecialInterwiki" }, "ExtensionFunctions": [ - "InterwikiHooks::onExtensionFunctions" + "MediaWiki\\Extension\\Interwiki\\Hooks::onExtensionFunctions" ], - "AutoloadClasses": { - "InterwikiHooks": "includes/InterwikiHooks.php", - "SpecialInterwiki": "includes/SpecialInterwiki.php", - "InterwikiLogFormatter": "includes/InterwikiLogFormatter.php" + "AutoloadNamespaces": { + "MediaWiki\\Extension\\Interwiki\\": "includes/" }, "LogActionsHandlers": { - "interwiki/*": "InterwikiLogFormatter" + "interwiki/*": "MediaWiki\\Extension\\Interwiki\\InterwikiLogFormatter" }, "manifest_version": 2 } diff --git a/includes/InterwikiHooks.php b/includes/Hooks.php similarity index 94% rename from includes/InterwikiHooks.php rename to includes/Hooks.php index aa538e3c..9f383c99 100644 --- a/includes/InterwikiHooks.php +++ b/includes/Hooks.php @@ -1,8 +1,12 @@ 'mw-interwikitable wikitable sortable body' ] ) . "\n";