* Daniel Friesen <[email protected]> [Wed, 12 Aug 2009 15:33:50 
-0700]:
> Take a good second look at the chunk of code you posted.
>
> $IP = getenv( 'MW_INSTALL_PATH' );
> if ( $IP === false ) {
>       $IP = dirname(__FILE__).'/../..';
> }
>
> This is precisely the reason the MW_INSTALL_PATH environment variable
> was introduced. This IS the standard bit of code meant for extensions
> that use maintenance scripts to copy.
>
MW_INSTALL_PATH is great, but it can cause the inclusion from the 
another MediaWiki installation on the same server (once I've had such 
error on v1.14 farm and v1.15 "alone for testing purposes") .
What about going down to path looking for dirs containing file 
LocalSettings.php ? Then it will be a $IP. That should be much more 
reliable than just looking for specific dir name. Also, that would be 
compatible with multiple MW installations.

> Trust me... I was the one with one of the strangest MediaWiki setups
> ever. Symlinks all over the place, multiple extension directories,
> multiple svn points, global configs, wiki installations near purely
> setup with symlinks to the base files, shell scripts for generating
> those installations and upgrading svn points, and so on...
> It was basically a personal mini-farm running all my wiki which had
> varying extensions setup and varying installations of MediaWiki 
(latest
> stable for most, trunk for the various dev sites).
> IIRC, That's how that chunk of code ended up inside MW in the first
> place.
>
I wish MediaWiki had farm-friendly LocalSettings.php (loading different 
set of $wg* variables according to host name), which would not require 
symlinks (not available in Windows). I do use Linux for hosting, but 
sometimes I have to debug in Windows. SO I make my own 
LocalSettings.php. Also, I think it would be great if these global 
static variables would be placed into static classess according to their 
purposes (usually there are "the sets" of variables which are designated 
to some aspect of wiki functioning).
Dmitriy

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to