From 5c608ed97933792700ee1d1b58d1f473e0fd8f1e Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 7 Dec 2010 03:15:51 +0000 Subject: [PATCH] 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. --- includes/installer/Installer.i18n.php | 12 ++++++++++-- includes/installer/WebInstaller.php | 15 +++++++++++++++ includes/installer/WebInstallerPage.php | 3 ++- skins/common/config.css | 4 ++++ skins/common/images/download-32.png | Bin 0 -> 2122 bytes 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100755 skins/common/images/download-32.png 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 0000000000000000000000000000000000000000..38068047547c35a450020bd94b15ab6ec1c8779d GIT binary patch literal 2122 zcmV-Q2(|Z#P) zuml)uP&$Bss==BJ?E63bvB^bYF`tW;_4M?tuu);%2S0rAzO$AOybNHLQebX&1{LL@ zM}Lrit?}Z}+woqXLaU)<dCl&NZhGlst2908uW zw&YHm0>zNTDJ~TXzPP%7aNuiN8XE8G8$3Vlnd~YyLM|BI%JQLQOJ$H&+i`TRjRYa( z?i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