Merge "installer: Remove <doclink/> parser function and last use of it"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 18 Jul 2019 02:18:35 +0000 (02:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 18 Jul 2019 02:18:35 +0000 (02:18 +0000)
includes/installer/WebInstaller.php
includes/installer/WebInstallerWelcome.php
includes/installer/i18n/en.json
includes/installer/i18n/qqq.json

index 33c06fe..db26c0b 100644 (file)
@@ -145,10 +145,6 @@ class WebInstaller extends Installer {
                parent::__construct();
                $this->output = new WebInstallerOutput( $this );
                $this->request = $request;
-
-               // Add parser hooks
-               $parser = MediaWikiServices::getInstance()->getParser();
-               $parser->setHook( 'doclink', [ $this, 'docLink' ] );
        }
 
        /**
@@ -1090,7 +1086,7 @@ class WebInstaller extends Installer {
        }
 
        /**
-        * Helper for Installer::docLink()
+        * Helper for WebInstallerOutput
         *
         * @internal For use by WebInstallerOutput
         * @param string $page
@@ -1106,21 +1102,6 @@ class WebInstaller extends Installer {
                return $this->getUrl( $query );
        }
 
-       /**
-        * Extension tag hook for a documentation link.
-        *
-        * @param string $linkText
-        * @param string[] $attribs
-        * @param Parser $parser Unused
-        *
-        * @return string
-        */
-       public function docLink( $linkText, $attribs, $parser ) {
-               $url = $this->getDocUrl( $attribs['href'] );
-
-               return Html::element( 'a', [ 'href' => $url ], $linkText );
-       }
-
        /**
         * Helper for sidebar links.
         *
index 28e8784..662a40d 100644 (file)
@@ -33,8 +33,12 @@ class WebInstallerWelcome extends WebInstallerPage {
                if ( $status->isGood() ) {
                        $this->parent->output->addHTML( '<span class="success-message">' .
                                wfMessage( 'config-env-good' )->escaped() . '</span>' );
-                       $this->parent->output->addWikiTextAsInterface( wfMessage( 'config-copyright',
-                               SpecialVersion::getCopyrightAndAuthorList() )->plain() );
+                       $this->parent->output->addWikiTextAsInterface(
+                               wfMessage( 'config-welcome-section-copyright',
+                                       SpecialVersion::getCopyrightAndAuthorList(),
+                                       wfExpandUrl( $this->parent->getDocUrl( 'Copying' ) )
+                               )->plain()
+                       );
                        $this->startForm();
                        $this->endForm();
                } else {
index 5f5e452..52d8d3d 100644 (file)
@@ -39,7 +39,7 @@
        "config-help-restart": "Do you want to clear all saved data that you have entered and restart the installation process?",
        "config-restart": "Yes, restart it",
        "config-welcome": "=== Environmental checks ===\nBasic checks will now be performed to see if this environment is suitable for MediaWiki installation.\nRemember to include this information if you seek support on how to complete the installation.",
-       "config-copyright": "=== Copyright and Terms ===\n\n$1\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but <strong>without any warranty</strong>; without even the implied warranty of <strong>merchantability</strong> or <strong>fitness for a particular purpose</strong>.\nSee the GNU General Public License for more details.\n\nYou should have received <doclink href=Copying>a copy of the GNU General Public License</doclink> along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA, or [https://www.gnu.org/copyleft/gpl.html read it online].",
+       "config-welcome-section-copyright": "=== Copyright and Terms ===\n\n$1\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but <strong>without any warranty</strong>; without even the implied warranty of <strong>merchantability</strong> or <strong>fitness for a particular purpose</strong>.\nSee the GNU General Public License for more details.\n\nYou should have received [$2 a copy of the GNU General Public License] along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA, or [https://www.gnu.org/copyleft/gpl.html read it online].",
        "config-sidebar": "* [https://www.mediawiki.org MediaWiki home]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Administrator's Guide]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ FAQ]",
        "config-sidebar-readme": "Read me",
        "config-sidebar-relnotes": "Release notes",
index 6a821b8..a1e6dd6 100644 (file)
@@ -63,7 +63,7 @@
        "config-help-restart": "Message in warning box in MediaWiki installer.",
        "config-restart": "Button text to confirm the installation procedure has to be restarted.",
        "config-welcome": "Notice that the installer is about to check as to whether MediaWiki can be installed.",
-       "config-copyright": "This message follows {{msg-mw|config-env-good}}.\n\nParameters:\n* $1 - copyright and author list",
+       "config-welcome-section-copyright": "This message follows {{msg-mw|config-env-good}}.\n\nParameters:\n* $1 - copyright and author list\n* $2 - Link to the installer page that contains the license text\n",
        "config-sidebar": "Maximum width for words is 24 characters. Only visible part of the translation counts to this limit.",
        "config-sidebar-readme": "Link in sidebar to read the README documentation",
        "config-sidebar-relnotes": "Link in sidebar to read the RELEASE-NOTES documentation",