mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-26 08:35:42 +00:00
41ed1cc525
Bug: T319349 Change-Id: I640533dc7ee3b39157963024eae11dca583606cd
51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Skins\Vector;
|
|
|
|
/**
|
|
* @ingroup Skins
|
|
* @package Vector
|
|
* @internal
|
|
*/
|
|
class SkinVectorLegacy extends SkinVector {
|
|
/**
|
|
* Whether or not the legacy version of the skin is being used.
|
|
*
|
|
* @return bool
|
|
*/
|
|
protected function isLegacy(): bool {
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Show the ULS button if it's modern Vector, languages in header is enabled,
|
|
* and the ULS extension is enabled. 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 true;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
protected function isLanguagesInContentAt( $location ) {
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getTemplateData(): array {
|
|
$parentData = parent::getTemplateData();
|
|
|
|
// SkinVector sometimes serves new Vector as part of removing the
|
|
// skin version user preference. To avoid T302461 we need to unset it here.
|
|
// This shouldn't be run on SkinVector22.
|
|
unset( $parentData['data-toc'] );
|
|
return $parentData;
|
|
}
|
|
}
|