From: Daniel Friesen Date: Fri, 2 May 2008 06:09:58 +0000 (+0000) Subject: Tweak to commandLine.inc to make it follow the MW_INSTALL_PATH environment variable... X-Git-Tag: 1.31.0-rc.0~47951 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=498f57ac2fe8e0129b25859815059cf3f58ef5a6;p=lhc%2Fweb%2Fwiklou.git Tweak to commandLine.inc to make it follow the MW_INSTALL_PATH environment variable like tweaked maintenance scripts. --- diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 375448e2d7..4a86d4db18 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -37,7 +37,9 @@ $optionsWithArgs[] = 'conf'; # For specifying the location of LocalSettings.php $optionsWithArgs[] = 'aconf'; # As above for AdminSettings.php $self = array_shift( $argv ); -$IP = realpath( dirname( __FILE__ ) . '/..' ); +$IP = ( getenv('MW_INSTALL_PATH') !== false + ? getenv('MW_INSTALL_PATH') + : realpath( dirname( __FILE__ ) . '/..' ) ); #chdir( $IP ); require_once( "$IP/StartProfiler.php" );