dan nessett wrote:
> --- On Wed, 8/12/09, Brion Vibber <br...@wikimedia.org> wrote:
>
>   
>> Your setup is incorrect: the extensions folder *always*
>> goes inside the 
>> MediaWiki root dir. Always.
>>
>>     
>
> Sorry, my inexperience with Subversion led me in the wrong direction. I 
> didn't realize I could check out phase3 then point Subversion to the 
> extensions directory in phase3 to check out extensions. I thought Subversion 
> would get confused, but I just tried it and it worked :-). At least 
> Subversion performed the checkout. I haven't tried doing an update.
>
> I just (case sensitively) searched the extensions directory for the string 
> "$IP =" and found 32 files that compute $IP on their own. How about creating 
> a standard bit of code that extensions and other modules can copy and use to 
> figure out MW root. For example, it is very unlikely that the name of the 
> first level directory (i.e., phase3) will change. The code can call dirname( 
> __FILE__ ) and then search from the end of the pathname until it finds 
> phase3. It then knows that the prefix is MW root.
>
> Dan
>   
Since, when... I myself have NEVER setup a mediawiki installation with
the base directory named phase3.

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.

> export MW_INSTALL_PATH=$PWD
> php ../extensions/DumpHTML/DumpHTML.php
...

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.

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]



-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to