mediawiki-skins-Vector/includes/SkinVectorLegacy.php
Jon Robson eca9fcbf79 Drop the LatestSkinVersionRequirement
The LatestSkinVersionRequirement is problematic for various reasons:

1) It uses the "useskin" query string
parameter which may or may not refer to the correct
skin (in the case of a non-existent skin it will always come to the conclusion that
it is not modern Vector and thus must be legacy).

2) It uses the User object which may or may not be safeToLoad
depending on when called.

The feature seems redundant at this point, as we are separating code
into separate classes Vector and Vector22 and all the features only apply
to modern Vector. I suggest we remove it and use the features explicitly in the skin
intended.

Bug: T305232
Bug: T305262
Bug: T302627
Change-Id: I92fa33547bd601e05ddc8c1468e681892e47c16b
2022-04-04 19:22:38 +00:00

27 lines
387 B
PHP

<?php
namespace 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;
}
/**
* @inheritDoc
*/
protected function isLanguagesInContentAt( $location ) {
return false;
}
}