Merge SkinVector and VectorTemplate (step 2/2)
Rename SkinTemplateVector to restore SkinVector Bug: T251212 Change-Id: I7e06a4cc226f3434c0f655212a464b8b98bcc7f4
This commit is contained in:
parent
ee6974ad35
commit
2c74f08d3e
|
@ -9,7 +9,7 @@ use OutputPage;
|
|||
use RequestContext;
|
||||
use Skin;
|
||||
use SkinTemplate;
|
||||
use SkinTemplateVector;
|
||||
use SkinVector;
|
||||
use User;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ class Hooks {
|
|||
* @param SkinTemplate $sk
|
||||
*/
|
||||
public static function onBeforePageDisplay( OutputPage $out, $sk ) {
|
||||
if ( !$sk instanceof SkinTemplateVector ) {
|
||||
if ( !$sk instanceof SkinVector ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ class Hooks {
|
|||
* @param OutputPage $out OutputPage instance calling the hook
|
||||
*/
|
||||
public static function onMakeGlobalVariablesScript( &$vars, OutputPage $out ) {
|
||||
if ( $out->getSkin() instanceof SkinTemplateVector ) {
|
||||
if ( $out->getSkin() instanceof SkinVector ) {
|
||||
$skinVersionLookup = new SkinVersionLookup(
|
||||
$out->getRequest(),
|
||||
$out->getUser(),
|
||||
|
|
|
@ -28,8 +28,9 @@ use Vector\Constants;
|
|||
/**
|
||||
* Skin subclass for Vector
|
||||
* @ingroup Skins
|
||||
* Skins extending SkinVector are not supported
|
||||
*/
|
||||
class SkinTemplateVector extends SkinMustache {
|
||||
class SkinVector extends SkinMustache {
|
||||
|
||||
/** @var array of alternate message keys for menu labels */
|
||||
private const MENU_LABEL_KEYS = [
|
|
@ -16,8 +16,8 @@
|
|||
},
|
||||
"ValidSkinNames": {
|
||||
"vector": {
|
||||
"class": "SkinTemplateVector",
|
||||
"@args": "See SkinTemplateVector::__construct for more detail.",
|
||||
"class": "SkinVector",
|
||||
"@args": "See SkinVector::__construct for more detail.",
|
||||
"args": [
|
||||
{
|
||||
"name": "vector",
|
||||
|
@ -39,7 +39,7 @@
|
|||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"SkinTemplateVector": "includes/SkinTemplateVector.php"
|
||||
"SkinVector": "includes/SkinVector.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"Vector\\": "includes/"
|
||||
|
|
|
@ -3,7 +3,7 @@ namespace MediaWiki\Skins\Vector\Tests\Integration;
|
|||
|
||||
use MediaWikiIntegrationTestCase;
|
||||
use RequestContext;
|
||||
use SkinTemplateVector;
|
||||
use SkinVector;
|
||||
use Title;
|
||||
use Wikimedia\TestingAccessWrapper;
|
||||
|
||||
|
@ -13,15 +13,15 @@ use Wikimedia\TestingAccessWrapper;
|
|||
* @group Vector
|
||||
* @group Skins
|
||||
*
|
||||
* @coversDefaultClass \SkinTemplateVector
|
||||
* @coversDefaultClass \SkinVector
|
||||
*/
|
||||
class SkinTemplateVectorTest extends MediaWikiIntegrationTestCase {
|
||||
class SkinVectorTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
/**
|
||||
* @return \VectorTemplate
|
||||
*/
|
||||
private function provideVectorTemplateObject() {
|
||||
$template = new SkinTemplateVector();
|
||||
$template = new SkinVector();
|
||||
return $template;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ class SkinTemplateVectorTest extends MediaWikiIntegrationTestCase {
|
|||
* @covers ::getMenuProps
|
||||
*/
|
||||
public function testGetMenuProps() {
|
||||
$title = Title::newFromText( 'SkinTemplateVector' );
|
||||
$title = Title::newFromText( 'SkinVector' );
|
||||
$context = RequestContext::getMain();
|
||||
$context->setTitle( $title );
|
||||
$context->setLanguage( 'fr' );
|
|
@ -294,7 +294,7 @@ class VectorHooksTest extends \MediaWikiTestCase {
|
|||
$this->setMwGlobals( [
|
||||
'wgVectorUseIconWatch' => true
|
||||
] );
|
||||
$skin = new SkinTemplateVector( [ 'name' => 'vector' ] );
|
||||
$skin = new SkinVector( [ 'name' => 'vector' ] );
|
||||
$contentNavWatch = [
|
||||
'actions' => [
|
||||
'watch' => [ 'class' => 'watch' ],
|
||||
|
|
Loading…
Reference in New Issue