Cleanup: Remove non-functional hook

This doesn't work and Popups is not part of the
MediaWiki Language Extension Bundle

Change-Id: I66166ba964fba3a9ece865b701a95b66a924b9b6
This commit is contained in:
Jon Robson 2023-11-28 08:21:04 -08:00 committed by Jdlrobson
parent 6d642c38bd
commit 5abc2eed4c
2 changed files with 1 additions and 27 deletions

View file

@ -24,8 +24,7 @@
"GetPreferences": "PopupsHooks",
"UserGetDefaultOptions": "PopupsHooks",
"MakeGlobalVariablesScript": "PopupsHooks",
"LocalUserCreated": "PopupsHooks",
"ResourceLoaderRegisterModules": "PopupsHooks"
"LocalUserCreated": "PopupsHooks"
},
"HookHandlers": {
"PopupsHooks": {

View file

@ -28,8 +28,6 @@ use MediaWiki\Hook\MakeGlobalVariablesScriptHook;
use MediaWiki\MediaWikiServices;
use MediaWiki\Preferences\Hook\GetPreferencesHook;
use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook;
use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook;
use MediaWiki\ResourceLoader\ResourceLoader;
use MediaWiki\User\Hook\UserGetDefaultOptionsHook;
use MediaWiki\User\Options\UserOptionsManager;
use OutputPage;
@ -45,7 +43,6 @@ class PopupsHooks implements
GetPreferencesHook,
BeforePageDisplayHook,
ResourceLoaderGetConfigVarsHook,
ResourceLoaderRegisterModulesHook,
MakeGlobalVariablesScriptHook,
UserGetDefaultOptionsHook,
LocalUserCreatedHook
@ -283,26 +280,4 @@ class PopupsHooks implements
);
}
}
/**
* ResourceLoaderRegisterModules hook handler.
*
* Provides support for MLEB where needed.
*
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
*
* @param ResourceLoader $resourceLoader
*/
public function onResourceLoaderRegisterModules( ResourceLoader $resourceLoader ): void {
if ( !$resourceLoader->getModule( 'codex-search-styles' ) ) {
// We're running an older version of MediaWiki.
$resourceLoader->register( [
'codex-search-styles' => [
'localBasePath' => dirname( __DIR__ ),
'remoteExtPath' => 'UniversalLanguageSelector',
'styles' => 'resources/codex.mleb.css',
]
] );
}
}
}