Modify config-install-done, hopefully this is what Chad was looking for in CR r77948...
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 7 Dec 2010 03:15:51 +0000 (03:15 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 7 Dec 2010 03:15:51 +0000 (03:15 +0000)
includes/installer/Installer.i18n.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerPage.php
skins/common/config.css
skins/common/images/download-32.png [new file with mode: 0755]

index 463c244..ffc722c 100644 (file)
@@ -474,10 +474,16 @@ You have successfully installed MediaWiki.
 The installer has generated a <code>LocalSettings.php</code> 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.'
 );
 
index ec23b0f..fc250dc 100644 (file)
@@ -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 );
+       }
 }
index c2a117e..26dea3d 100644 (file)
@@ -941,7 +941,8 @@ class WebInstaller_Complete extends WebInstallerPage {
                                        $lsUrl,
                                        $GLOBALS['wgServer'] .
                                                $this->getVar( 'wgScriptPath' ) . '/index' .
-                                               $this->getVar( 'wgScriptExtension' )
+                                               $this->getVar( 'wgScriptExtension' ),
+                                       '<downloadlink/>'
                                ), 'tick-32.png'
                        )
                );
index b8db0b2..279b70e 100644 (file)
 #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 (executable)
index 0000000..3806804
Binary files /dev/null and b/skins/common/images/download-32.png differ