Avoid deprecated hook LanguageGetSpecialPageAliases.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 27 May 2019 19:30:17 +0000 (19:30 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 27 May 2019 19:30:17 +0000 (19:30 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2829 7aebc617-e5e2-0310-91dc-80fb5f6d2477

extension.json
wrreport.alias.php [new file with mode: 0644]
wrreport_body.php

index cdb54cdc865fd04b2faa6c6e8d2c17d8c251ac65..4a60cf79b038c475dd5f563caa7f69fde3aa5ecc 100644 (file)
@@ -32,7 +32,6 @@
                "remoteExtPath": "wrreport"
        },
        "Hooks": {
-               "LanguageGetSpecialPageAliases": "SpecialWrReport::LanguageGetSpecialPageAliasesHook",
                "ParserFirstCallInit": "WrReport::ParserFirstCallInitHook",
                "MobileMenu": "WrReport::MobileMenuHook"
        },
@@ -43,5 +42,8 @@
                "WrReportDeleteMode": "loggedin",
                "WrReportFeedRoot": "http://www.winterrodeln.org/feed"
        },
+       "ExtensionMessagesFiles": {
+               "wrreportAlias": "wrreport.alias.php"
+       },
        "manifest_version": 1
 }
diff --git a/wrreport.alias.php b/wrreport.alias.php
new file mode 100644 (file)
index 0000000..715e32e
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+$specialPageAliases = [];
+
+/** English (English) */
+$specialPageAliases['en'] = [
+       'wrreport' => [ 'Sledrun Reports' ],
+];
+
+
+/** German (Deutsch) */
+$specialPageAliases['de'] = [
+       'wrreport' => [ 'Bahnberichte' ],
+];
index 95e4407767894f6fd38ca74d32dbc292a4403a59..59d3997c75ddcfa8a282d2abbc8272430e68e97d 100644 (file)
@@ -1151,15 +1151,6 @@ class SpecialWrReport extends SpecialPage {
        }
 
 
-       static function LanguageGetSpecialPageAliasesHook(&$specialPageArray, $languageCode) {
-               $text = wfMessage('wrreport')->text(); // 'Bahnberichte'
-               $title = Title::newFromText($text); // 'Bahnberichte'
-               $specialPageArray['wrreport'][] = $title->getDBKey(); // 'Bahnberichte'
-               return true;
-       }
-
-
-
        /// \param $par Possibilities:
        /// - action == 'view' (default)
        /// - action == 'preview': Preview new report