Skip to content

Commit e370eda

Browse files
committed
Initial support for MediaWiki 1.43
1 parent c6b5be7 commit e370eda

File tree

3 files changed

+44
-14
lines changed

3 files changed

+44
-14
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ Parts of this theme are licensed under [BSD 3-clause license](https://www.openso
77
* **1.x**: Compatible with SMF2.0 [No longer actively developed]
88

99
#### Branches organization:
10-
* ***master*** - main branch, v2.1 (smfCurve2) compatible with **SMF2.1**, Supporting MediaWiki 1.39+
11-
* ***2.0*** - main branch, v2.0 (smfCurve2) compatible with **SMF2.1**, Supporting MediaWiki 1.31-1.35
12-
* ***1.4*** - for MediaWiki 1.31-1.35 (LTS)
13-
* ***1.3*** - for MediaWiki 1.27 (LTS)
14-
* ***1.2*** - for MediaWiki 1.25+
15-
* ***1.1*** - for MediaWiki 1.23 (LTS)
16-
* ***1.0*** - for old MediaWiki installs (Prior to 1.23)
10+
| Version | MediaWiki | SMF 2.0 | SMF 2.1 |
11+
| ------- | ---------- | ------------------ | ------------------ |
12+
| master | 1.43 (LTS) | :white_check_mark: | :white_check_mark: |
13+
| 2.0 | 1.39 (LTS | :white_check_mark: | :white_check_mark: |
14+
| 1.4 | 1.35 (LTS) | :white_check_mark: | :x: |
15+
| 1.3 | 1.27 (LTS) | :white_check_mark: | :x: |
16+
| 1.2 | 1.25 | :white_check_mark: | :x: |
17+
| 1.1 | 1.23 (LTS) | :white_check_mark: | :x: |
18+
| 1.0 | 1.23- | :white_check_mark: | :x: |
1719

1820
#### Notes:
1921
Feel free to fork this repository and make your desired changes.

includes/smfCurve2Template.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public function execute()
249249

250250
case 'TOOLBOX':
251251
$this->buildBox('tb', $this->get('sidebar')['TOOLBOX'], 'toolbox', 'SkinTemplateToolboxEnd' );
252-
Hooks::run( 'smfCurve2AfterToolbox' );
252+
(MediaWikiServices::getInstance()->getHookContainer())->run( 'smfCurve2AfterToolbox' );
253253
break;
254254

255255
case 'LANGUAGES':
@@ -326,7 +326,7 @@ public function execute()
326326
</div>
327327
<!-- #footerfix -->';
328328

329-
Hooks::run( 'smfcurve2BeforeFooter' );
329+
(MediaWikiServices::getInstance()->getHookContainer())->run( 'smfcurve2BeforeFooter' );
330330

331331
if (method_exists($this, 'customPagePreFooter'))
332332
$this->customPagePreFooter();
@@ -404,9 +404,11 @@ public function userMenu($limitUrls = [], $inverseLimit = false, $menuID = 'u')
404404
continue;
405405
elseif (!empty($limitUrls) && !empty($inverseLimit) && in_array($key, $limitUrls))
406406
continue;
407+
elseif (empty($item['href']))
408+
continue;
407409

408410
echo '
409-
<li data-key="', $key, '" id="', Sanitizer::escapeIdForAttribute('pt-' . $key), '"', ($item['active'] ? ' class="active"' : ''), '>
411+
<li data-key="', $key, '" id="', Sanitizer::escapeIdForAttribute('pt-' . $key), '"', (!empty($item['active']) ? ' class="active"' : ''), '>
410412
<a href="', htmlspecialchars($item['href']) , '"', (!empty($item['class']) ? ' class="' . htmlspecialchars($item['class']) . '"' : ''), '><span class="generic_icons '.Sanitizer::escapeIdForAttribute($key).'"></span><span class="pt-itemText">', htmlspecialchars($item['text']), '</span></a>
411413
</li>';
412414
}
@@ -542,7 +544,7 @@ function toolbox()
542544
echo '
543545
<li id="t-ispermalink">', $this->getMsg('permalink')->text(), '</li>';
544546

545-
Hooks::run('smfCurve2AfterToolboxEnd');
547+
(MediaWikiServices::getInstance()->getHookContainer())->run('smfCurve2AfterToolboxEnd');
546548

547549
echo '
548550
</ul>
@@ -587,7 +589,7 @@ protected function buildBox($boxName, $cont, $msg = null, $hook = null)
587589
if ($hook !== null) {
588590
// Avoid PHP 7.1 warning
589591
$skin = $this;
590-
Hooks::run($hook, [ &$skin, true ]);
592+
(MediaWikiServices::getInstance()->getHookContainer())->run($hook, [ &$skin, true ]);
591593
}
592594

593595
echo '

skin.json

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,20 @@
5757
"ResourceModules": {
5858
"skins.smfcurve2": {
5959
"targets": [ "desktop", "mobile" ],
60-
"class": "ResourceLoaderSkinModule",
60+
"class": "MediaWiki\\ResourceLoader\\SkinModule",
61+
"features": [
62+
"elements",
63+
"interface",
64+
"logo",
65+
"content-links",
66+
"content-media",
67+
"interface-message-box",
68+
"interface-category",
69+
"content-tables",
70+
"i18n-ordered-lists",
71+
"i18n-all-lists-margins",
72+
"i18n-headings"
73+
],
6174
"styles": {
6275
"resources/css/main.css": {
6376
"media": "screen"
@@ -78,7 +91,20 @@
7891
},
7992
"skins.smfcurve2custom": {
8093
"targets": [ "desktop", "mobile" ],
81-
"class": "ResourceLoaderSkinModule",
94+
"class": "MediaWiki\\ResourceLoader\\SkinModule",
95+
"features": [
96+
"elements",
97+
"interface",
98+
"logo",
99+
"content-links",
100+
"content-media",
101+
"interface-message-box",
102+
"interface-category",
103+
"content-tables",
104+
"i18n-ordered-lists",
105+
"i18n-all-lists-margins",
106+
"i18n-headings"
107+
],
82108
"styles": {
83109
"resources/css/custom.css": {
84110
"media": "screen"

0 commit comments

Comments
 (0)