Follow-up r82504: use JS redirection only for IE, I don't like how it looks at least...
authorMax Semenik <maxsem@users.mediawiki.org>
Tue, 22 Feb 2011 17:15:48 +0000 (17:15 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Tue, 22 Feb 2011 17:15:48 +0000 (17:15 +0000)
includes/installer/WebInstallerPage.php

index b225ec7..e166dd3 100644 (file)
@@ -1060,9 +1060,13 @@ class WebInstaller_Complete extends WebInstallerPage {
                // Pop up a dialog box, to make it difficult for the user to forget
                // to download the file
                $lsUrl = $GLOBALS['wgServer'] . $this->parent->getURL( array( 'localsettings' => 1 ) );
-               $this->addHtml( '<script type="' . $GLOBALS['wgJsMimeType'] . '">jQuery( document ).ready( function() { document.location='
-                       . Xml::encodeJsVar( $lsUrl) . "; } );</script>\n" );
-               // JS appears the only method that works consistently with IE7+
+               if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) {
+                       // JS appears the only method that works consistently with IE7+
+                       $this->addHtml( "\n<script type=\"" . $GLOBALS['wgJsMimeType'] . '">jQuery( document ).ready( function() { document.location='
+                               . Xml::encodeJsVar( $lsUrl) . "; } );</script>\n" );
+               } else {
+                       $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );
+               }
 
                $this->startForm();
                $this->parent->disableLinkPopups();