Merge "Cleanup: Remove non-functional hook"

This commit is contained in:
jenkins-bot 2023-12-01 17:06:11 +00:00 committed by Gerrit Code Review
commit cdfd8d2f37
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',
]
] );
}
}
}