Drop support for MW 1.40

Bug: T369064
Change-Id: Id3dde7df0fe963a35c68ff5b6bdf56a268eacc6e
This commit is contained in:
Abijeet
2024-07-03 18:32:19 +05:30
committed by jenkins-bot
parent c20d1f0c23
commit c82cd6dee0
3 changed files with 5 additions and 13 deletions

View File

@@ -18,7 +18,7 @@
"descriptionmsg": "uls-desc", "descriptionmsg": "uls-desc",
"license-name": "GPL-2.0-or-later OR MIT", "license-name": "GPL-2.0-or-later OR MIT",
"requires": { "requires": {
"MediaWiki": ">= 1.40.0" "MediaWiki": ">= 1.41.0"
}, },
"Hooks": { "Hooks": {
"BeforePageDisplay": "main", "BeforePageDisplay": "main",

View File

@@ -153,15 +153,9 @@ class Hooks implements
* @param OutputPage $out * @param OutputPage $out
*/ */
private function loadCodexStyles( OutputPage $out ) { private function loadCodexStyles( OutputPage $out ) {
if ( version_compare( MW_VERSION, '1.41', '<' ) ) { // Only needed for skins that do not load Codex.
// codex-search-styles was added in 1.41 so in older versions for MLEB support if ( !in_array( $out->getSkin()->getSkinName(), [ 'minerva', 'vector-2022' ] ) ) {
// we load the full module. $out->addModuleStyles( 'codex-search-styles' );
$out->addModuleStyles( '@wikimedia/codex' );
} else {
// Only needed for skins that do not load Codex.
if ( !in_array( $out->getSkin()->getSkinName(), [ 'minerva', 'vector-2022' ] ) ) {
$out->addModuleStyles( 'codex-search-styles' );
}
} }
} }

View File

@@ -196,9 +196,7 @@
} }
function userCanChangeLanguage() { function userCanChangeLanguage() {
return mw.config.get( 'wgULSAnonCanChangeLanguage' ) || return mw.config.get( 'wgULSAnonCanChangeLanguage' ) || mw.user.isNamed();
// mw.user.isNamed() added in MW 1.40. Remove after MLEB drop support for MW < 1.40
( typeof mw.user.isNamed === 'function' ? mw.user.isNamed() : !mw.user.isAnon() );
} }
/** /**