Disable languages on history page

Bug: T328996
Change-Id: I895bea1e7d3e0c23bcc60395e562297e016d1f5a
(cherry picked from commit d2eb3c4e55)
This commit is contained in:
Jon Robson 2023-02-07 10:57:30 -08:00 committed by Jdlrobson
parent 137a8fb6be
commit c7eb42fc9c

View file

@ -65,6 +65,14 @@ class SkinVector22 extends SkinMustache {
* @return bool
*/
private function canHaveLanguages(): bool {
$action = $this->getContext()->getActionName();
// FIXME: This logic should be moved into the ULS extension or core given the button is hidden,
// it should not be rendered, short term fix for T328996.
if ( $action === 'history' ) {
return false;
}
$title = $this->getTitle();
// Defensive programming - if a special page has added languages explicitly, best to show it.
if ( $title && $title->isSpecialPage() && empty( $this->getLanguagesCached() ) ) {