r91726 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91725‎ | r91726 | r91727 >
Date:14:25, 8 July 2011
Author:demon
Status:ok
Tags:
Comment:
Revert r91263 (fixing $wgScriptPath for cli installer). Completely breaks the web installer for two important reasons:
* $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!
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -150,7 +150,6 @@
151151 * svip
152152 * The Evil IP address
153153 * Tisane
154 -* Tobias Müller
155154 * Umherirrender
156155 * Ville Stadista
157156 * Vitaliy Filippov
Index: trunk/phase3/includes/installer/Installer.php
@@ -860,13 +860,12 @@
861861 // PHP_SELF isn't available sometimes, such as when PHP is CGI but
862862 // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
863863 // to get the path to the current script... hopefully it's reliable. SIGH
864 - if ( $this->getVar( 'wgScriptPath' ) ) {
865 - // Some kind soul has set it for us already (e.g. debconf)
866 - return true;
867 - } elseif ( !empty( $_SERVER['PHP_SELF'] ) ) {
 864+ if ( !empty( $_SERVER['PHP_SELF'] ) ) {
868865 $path = $_SERVER['PHP_SELF'];
869866 } elseif ( !empty( $_SERVER['SCRIPT_NAME'] ) ) {
870867 $path = $_SERVER['SCRIPT_NAME'];
 868+ } elseif ( $this->getVar( 'wgScriptPath' ) ) {
 869+ // Some kind soul has set it for us already (e.g. debconf)
871870 return true;
872871 } else {
873872 $this->showError( 'config-no-uri' );
@@ -1250,7 +1249,7 @@
12511250 require( "$IP/includes/DefaultSettings.php" );
12521251
12531252 foreach( $exts as $e ) {
1254 - require_once( "$IP/extensions/$e/$e.php" );
 1253+ require_once( "$IP/extensions/$e/$e.php" );
12551254 }
12561255
12571256 $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91263Fix for Bug #29628 - scriptpath Option of maintenance/install.php is ignored...mah14:22, 1 July 2011

Status & tagging log