From: Tim Starling Date: Tue, 7 Dec 2010 03:15:51 +0000 (+0000) Subject: Modify config-install-done, hopefully this is what Chad was looking for in CR r77948... X-Git-Tag: 1.31.0-rc.0~33490 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=5c608ed97933792700ee1d1b58d1f473e0fd8f1e;p=lhc%2Fweb%2Fwiklou.git Modify config-install-done, hopefully this is what Chad was looking for in CR r77948. Added a large, obvious download link with icon from the Crystal Project. --- diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 463c244ca2..ffc722c919 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -474,10 +474,16 @@ You have successfully installed MediaWiki. The installer has generated a LocalSettings.php file. It contains all your configuration. -You will need to [$1 download] it and put it in the base of your wiki installation (the same directory as index.php). +You will need to download it and put it in the base of your wiki installation (the same directory as index.php). The download should have started automatically. + +If the download was not offerred, or if you cancelled it, you can restart the download by clicking the link below: + +$3 + '''Note''': If you do not do this now, this generated configuration file will not be available to you later if you exit the installation without downloading it. When that has been done, you can '''[$2 enter your wiki]'''.", // $1 is the URL to LocalSettings download, $2 is link to wiki + 'config-download-localsettings' => 'Download LocalSettings.php', 'config-help' => 'help', ); @@ -565,7 +571,9 @@ $messages['qqq'] = array( 'config-install-sysop' => 'Message indicates that the administrator user account is being created', 'config-install-done' => 'Parameters: * $1 is the URL to LocalSettings download -* $2 is a link to the wiki.', +* $2 is a link to the wiki. +* $3 is a download link with attached download icon. The config-download-localsettings message will be used as the link text.', + 'config-download-localsettings' => 'The link text used in the download link in config-install-done.', 'config-help' => 'This is used in help boxes.' ); diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index ec23b0f393..fc250dcfc2 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -99,6 +99,10 @@ class WebInstaller extends CoreInstaller { parent::__construct(); $this->output = new WebInstallerOutput( $this ); $this->request = $request; + + // Add parser hook for WebInstaller_Complete + global $wgParser; + $wgParser->setHook( 'downloadlink', array( $this, 'downloadLinkHook' ) ); } /** @@ -956,4 +960,15 @@ class WebInstaller extends CoreInstaller { return $url; } + public function downloadLinkHook( $text, $attribs, $parser ) { + $img = Html::element( 'img', array( + 'src' => '../skins/common/images/download-32.png', + 'width' => '32', + 'height' => '32', + ) ); + $anchor = Html::rawElement( 'a', + array( 'href' => $this->getURL( array( 'localsettings' => 1 ) ) ), + $img . ' ' . wfMsgHtml( 'config-download-localsettings' ) ); + return Html::rawElement( 'div', array( 'class' => 'config-download-link' ), $anchor ); + } } diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index c2a117e278..26dea3da64 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -941,7 +941,8 @@ class WebInstaller_Complete extends WebInstallerPage { $lsUrl, $GLOBALS['wgServer'] . $this->getVar( 'wgScriptPath' ) . '/index' . - $this->getVar( 'wgScriptExtension' ) + $this->getVar( 'wgScriptExtension' ), + '' ), 'tick-32.png' ) ); diff --git a/skins/common/config.css b/skins/common/config.css index b8db0b2206..279b70ee75 100644 --- a/skins/common/config.css +++ b/skins/common/config.css @@ -153,3 +153,7 @@ #config-memcachewrapper { display: none; } +.config-download-link { + font-size: 1.8em; + margin-left: 2em; +} diff --git a/skins/common/images/download-32.png b/skins/common/images/download-32.png new file mode 100755 index 0000000000..3806804754 Binary files /dev/null and b/skins/common/images/download-32.png differ