From 51c7fe4f34b4e85db29fb3dc59ac4faa0e85931a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 8 May 2009 08:54:47 +0000 Subject: [PATCH] * 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 --- maintenance/commandLine.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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" ); */ -- 2.20.1