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

Commit 439bc65

Browse files
authored
Fixes deprecation warnings (#13)
* Fixes deprecation warnings - Module mediawiki.skinning.content.externallinks is removed in 1.39 - Adds version requirement - Removes output of head tag in 1.39
1 parent e0a6d86 commit 439bc65

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

includes/Skin2018Template.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@ public function execute() {
2020
}
2121

2222
// Output <head>
23-
echo $this->get( 'headelement' );
23+
$pre139 = version_compare( MW_VERSION, '1.39', '<' );
24+
if ( $pre139 ) {
25+
echo $this->get( 'headelement' );
26+
}
2427

2528
// Output <body> using Mustache
2629
$templateParser = new TemplateParser( __DIR__ . '/../resources/templates' );
2730

2831
echo $templateParser->processTemplate(
2932
'main', $this->data
3033
);
34+
if ( $pre139 ) {
35+
echo '</body></html>';
36+
}
37+
3138
}
3239
}

resources/templates/main.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<body>
1+
<!-- start -->
22
{{! TODO: Replace UIkit with something that's more CSS and less JS, for better default usability https://github.com/troxler/awesome-css-frameworks }}
33
{{! TODO: Better mermaid integration to remove need for <pre> tags }}
44
{{! TODO: Better image handling to prevent overrun }}
@@ -132,4 +132,4 @@
132132
</div>
133133
</footer>
134134
</div>
135-
</body>
135+
<!-- end -->

skin.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
{
1515
"name": "2018",
1616
"responsive": true,
17+
"bodyOnly": true,
1718
"styles": [
18-
"mediawiki.skinning.content.externallinks",
1919
"skins.2018"
2020
],
2121
"scripts": [
@@ -33,6 +33,10 @@
3333
"ResourceModules": {
3434
"skins.2018": {
3535
"class": "ResourceLoaderSkinModule",
36+
"features": {
37+
"content-links": true,
38+
"content-links-external": true
39+
},
3640
"styles": {
3741
"resources/less/styles.less": {
3842
"media": "screen"

0 commit comments

Comments
 (0)