mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 17:40:12 +00:00
Merge "Hide language menu in sticky header on non-subject pages"
This commit is contained in:
commit
a29cca0c10
|
@ -164,13 +164,15 @@ class SkinVector22 extends SkinMustache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the ULS button if it's modern Vector, languages in header is enabled,
|
* Show the ULS button if it's modern Vector, languages in header is enabled,
|
||||||
* and the ULS extension is enabled. Hide it otherwise.
|
* the ULS extension is enabled, and we are on a subect page. Hide it otherwise.
|
||||||
* There is no point in showing the language button if ULS extension is unavailable
|
* There is no point in showing the language button if ULS extension is unavailable
|
||||||
* as there is no ways to add languages without it.
|
* as there is no ways to add languages without it.
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function shouldHideLanguages(): bool {
|
protected function shouldHideLanguages(): bool {
|
||||||
return !$this->isLanguagesInContent() || !$this->isULSExtensionEnabled();
|
$title = $this->getTitle();
|
||||||
|
$isSubjectPage = $title && $title->exists() && !$title->isTalkPage();
|
||||||
|
return !$this->isLanguagesInContent() || !$this->isULSExtensionEnabled() || !$isSubjectPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue