Index: trunk/phase3/extensions/README |
— | — | @@ -15,8 +15,13 @@ |
16 | 16 | |
17 | 17 | |
18 | 18 | Please note that under POSIX systems (Linux...), parent of a symbolic path |
19 | | -refers to the link source, NOT to the target! If you need to include a |
20 | | -file from mediawiki/, you will want to set and use MW_INSTALL_PATH env. |
| 19 | +refers to the link source, NOT to the target! You should check the env |
| 20 | +variable MW_INSTALL_PATH in case the extension is not in the default location. |
21 | 21 | |
22 | | - $IP = getenv( 'MW_INSTALL_PATH' ); // points to mediawiki/ |
23 | | - require( "$IP/maintenance/Maintenance.php" ); // a MediaWiki file |
| 22 | +The following code snippet let you override the default path: |
| 23 | + |
| 24 | + $IP = getenv( 'MW_INSTALL_PATH' ); |
| 25 | + if( $IP === false ) { |
| 26 | + $IP = dirname( __FILE__ ) . '/../..'; |
| 27 | + } |
| 28 | + require( "$IP/maintenance/Maintenance.php" ); // a MediaWiki core file |