r91263 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91262‎ | r91263 | r91264 >
Date:14:22, 1 July 2011
Author:mah
Status:reverted (Comments)
Tags:
Comment:
Fix for Bug #29628 - scriptpath Option of maintenance/install.php is ignored

The Script Path Option (--scriptpath) of maintenance/install.php
is silently ignored if there is $_SERVER['SCRIPT_NAME'] set.

Apply patch from Tobias Müller.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -148,6 +148,7 @@
149149 * Str4nd
150150 * svip
151151 * Tisane
 152+* Tobias Müller
152153 * Umherirrender
153154 * Ville Stadista
154155 * Vitaliy Filippov
Index: trunk/phase3/includes/installer/Installer.php
@@ -860,12 +860,13 @@
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 ( !empty( $_SERVER['PHP_SELF'] ) ) {
 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'] ) ) {
865868 $path = $_SERVER['PHP_SELF'];
866869 } elseif ( !empty( $_SERVER['SCRIPT_NAME'] ) ) {
867870 $path = $_SERVER['SCRIPT_NAME'];
868 - } elseif ( $this->getVar( 'wgScriptPath' ) ) {
869 - // Some kind soul has set it for us already (e.g. debconf)
870871 return true;
871872 } else {
872873 $this->showError( 'config-no-uri' );
@@ -1249,7 +1250,7 @@
12501251 require( "$IP/includes/DefaultSettings.php" );
12511252
12521253 foreach( $exts as $e ) {
1253 - require_once( "$IP/extensions/$e/$e.php" );
 1254+ require_once( "$IP/extensions/$e/$e.php" );
12541255 }
12551256
12561257 $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?

Follow-up revisions

RevisionCommit summaryAuthorDate
r91726Revert r91263 (fixing $wgScriptPath for cli installer). Completely breaks the...demon14:25, 8 July 2011

Comments

#Comment by 😂 (talk | contribs)   17:55, 1 July 2011

Needs release notes :)

#Comment by 😂 (talk | contribs)   14:25, 8 July 2011

Reverted in r

Status & tagging log