Revert r91263 (fixing $wgScriptPath for cli installer). Completely breaks the web...
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 8 Jul 2011 14:25:01 +0000 (14:25 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 8 Jul 2011 14:25:01 +0000 (14:25 +0000)
* $wgScriptPath always has a default value of '/wiki', so the getVar() check will always be true and skip the environment check
* Also began returning true in the SCRIPT_NAME which would mean $wgScriptPath never got set

Breakage spotted by LewisCawte on IRC, thanks!

CREDITS
includes/installer/Installer.php

diff --git a/CREDITS b/CREDITS
index dfde887..a3b13e5 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -150,7 +150,6 @@ following names for their contribution to the product.
 * svip
 * The Evil IP address
 * Tisane
-* Tobias Müller
 * Umherirrender
 * Ville Stadista
 * Vitaliy Filippov
index dfc56e9..f9f59cd 100644 (file)
@@ -860,13 +860,12 @@ abstract class Installer {
                // PHP_SELF isn't available sometimes, such as when PHP is CGI but
                // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
                // to get the path to the current script... hopefully it's reliable. SIGH
-               if ( $this->getVar( 'wgScriptPath' ) ) {
-                       // Some kind soul has set it for us already (e.g. debconf)
-                       return true;
-               } elseif ( !empty( $_SERVER['PHP_SELF'] ) ) {
+               if ( !empty( $_SERVER['PHP_SELF'] ) ) {
                        $path = $_SERVER['PHP_SELF'];
                } elseif ( !empty( $_SERVER['SCRIPT_NAME'] ) ) {
                        $path = $_SERVER['SCRIPT_NAME'];
+               } elseif ( $this->getVar( 'wgScriptPath' ) ) {
+                       // Some kind soul has set it for us already (e.g. debconf)
                        return true;
                } else {
                        $this->showError( 'config-no-uri' );
@@ -1250,7 +1249,7 @@ abstract class Installer {
                require( "$IP/includes/DefaultSettings.php" );
 
                foreach( $exts as $e ) {
-                       require_once( "$IP/extensions/$e/$e.php" );
+                       require_once( "$IP/extensions/$e/$e.php" );
                }
 
                $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?