From: Alexandre Emsenhuber Date: Fri, 8 May 2009 08:54:47 +0000 (+0000) Subject: * Fix for r50316 and r50324: require ProfilerStub.php if StartProfiler.php doesn... X-Git-Tag: 1.31.0-rc.0~41845 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=51c7fe4f34b4e85db29fb3dc59ac4faa0e85931a;p=lhc%2Fweb%2Fwiklou.git * Fix for r50316 and r50324: require ProfilerStub.php if StartProfiler.php doesn't exist to aviod call to undefined function wfProfileIn() * Removed already commented out "require_once( $IP.'/includes/ProfilerStub.php' );" now really obsolete --- diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 8ccb72beec..a221e6457e 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -45,7 +45,9 @@ $IP = strval( getenv('MW_INSTALL_PATH') ) !== '' : realpath( dirname( __FILE__ ) . '/..' ); #chdir( $IP ); if ( file_exists( "$IP/StartProfiler.php" ) ) { - require_once( "$IP/StartProfiler.php" ); + require_once( "$IP/StartProfiler.php" ); +} else { + require_once( "$IP/includes/ProfilerStub.php" ); } $options = array(); @@ -196,8 +198,7 @@ if ( file_exists( dirname(__FILE__).'/wikimedia-mode' ) ) { $wgCommandLineMode = true; $DP = $IP; require_once( "$IP/includes/AutoLoader.php" ); - #require_once( $IP.'/includes/ProfilerStub.php' ); - require_once( $IP.'/includes/Defines.php' ); + require_once( "$IP/includes/Defines.php" ); require_once( $settingsFile ); /* ini_set( 'include_path', ".$sep$IP$sep$IP/includes$sep$IP/languages$sep$IP/maintenance" ); */