Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Commit 1c51b86

Browse files
committed
Revised php to conform with MediaWiki style requirements
1 parent 81bffed commit 1c51b86

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@ class Skin2018 extends SkinTemplate {
1515
* @param $out OutputPage
1616
*/
1717
public function initPage( OutputPage $out ) {
18-
1918
$out->addMeta( 'viewport', 'width=device-width, initial-scale=1.0' );
2019

21-
$out->addModuleStyles( array(
20+
$out->addModuleStyles( [
2221
// 'mediawiki.skinning.elements',
2322
// 'mediawiki.skinning.content',
2423
// 'mediawiki.skinning.interface',
2524
'mediawiki.skinning.content.externallinks',
2625
'skins.2018'
27-
) );
28-
$out->addModules( array(
26+
] );
27+
$out->addModules( [
2928
'skins.2018.js'
30-
) );
29+
] );
3130
}
3231

3332
/**
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ class Skin2018Template extends BaseTemplate {
99
* Outputs the content of the page
1010
*/
1111
public function execute() {
12-
1312
// Rearrange parts of $this->data for easier handling in the template
14-
unset($this->data['nav_urls']['mainpage']);
13+
unset( $this->data['nav_urls']['mainpage'] );
1514
if ( isset( $this->data['content_navigation']['actions']['watch'] ) ) {
1615
$this->data['watch_indicator']['watch'] = $this->data['content_navigation']['actions']['watch'];
1716
unset( $this->data['content_navigation']['actions']['watch'] );
@@ -22,9 +21,9 @@ public function execute() {
2221

2322
// Output <head>
2423
echo $this->get( 'headelement' );
25-
24+
2625
// Output <body> using Mustache
27-
$templateParser = new TemplateParser( __DIR__ . '/../resources/templates' );
26+
$templateParser = new TemplateParser( __DIR__ . '/../resources/templates' );
2827

2928
echo $templateParser->processTemplate(
3029
'main', $this->data

skin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"remoteSkinPath": "2018"
4545
},
4646
"AutoloadClasses": {
47-
"Skin2018": "includes/2018.skin.php",
48-
"Skin2018Template": "includes/2018Template.php"
47+
"Skin2018": "includes/Skin2018.php",
48+
"Skin2018Template": "includes/Skin2018Template.php"
4949
},
5050
"manifest_version": 1
5151
}

0 commit comments

Comments
 (0)