r35910 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35909‎ | r35910 | r35911 >
Date:07:02, 5 June 2008
Author:tstarling
Status:old
Tags:
Comment:
Use MW_INSTALL_PATH environment variable
Modified paths:
  • /trunk/extensions/BotQuery/query.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BotQuery/query.php
@@ -22,7 +22,10 @@
2323 */
2424
2525 $startTime = microtime(true);
26 -$IP = dirname( realpath( __FILE__ ) ) . '/../..';
 26+$IP = getenv( 'MW_INSTALL_PATH' );
 27+if ( $IP === false ) {
 28+ $IP = dirname( realpath( __FILE__ ) ) . '/../..';
 29+}
2730 chdir( $IP );
2831
2932 // Allow requests to go to an alternative site (proxying)

Status & tagging log