Merge "Hide language menu in sticky header on non-subject pages"

This commit is contained in:
jenkins-bot 2023-03-24 14:12:35 +00:00 committed by Gerrit Code Review
commit a29cca0c10

View file

@ -164,13 +164,15 @@ class SkinVector22 extends SkinMustache {
/**
* 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
* as there is no ways to add languages without it.
* @return 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;
}
/**