--- On Tue, 8/11/09, Aryeh Gregor <simetrical+wikil...@gmail.com> wrote:

> Then you're doing almost exactly the same thing we're doing
> now,
> except with MWInit.php instead of LocalSettings.php. 
> $IP is normally
> set in LocalSettings.php for most page views.  Some
> places still must
> figure it out independently in either case, e.g.,
> config/index.php.
> 

I want to avoid seeming obsessed by this issue, but file position dependent 
code is a significant generator of bugs in other software. The difference 
between MWInit.php and LocalSettings.php is if you get the former into a 
directory that PHP uses for includes, you have a way of getting the root path 
of MW without the caller knowing anything about the relative structure of the 
code distribution tree hierarchy. As you pointed out previously, the reason you 
need to compute $IP before including/requiring LocalSettings is you don't know 
where it is.

Dan


      

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

Reply via email to