Tweak to commandLine.inc to make it follow the MW_INSTALL_PATH environment variable...
authorDaniel Friesen <dantman@users.mediawiki.org>
Fri, 2 May 2008 06:09:58 +0000 (06:09 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Fri, 2 May 2008 06:09:58 +0000 (06:09 +0000)
maintenance/commandLine.inc

index 375448e..4a86d4d 100644 (file)
@@ -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" );