Last modified: 2013-09-26 05:13:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56483, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54483 - $IP used in DefaultSettings
$IP used in DefaultSettings
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2013-09-23 21:44 UTC by Matthew Flaschen
Modified: 2013-09-26 05:13 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-09-23 21:44:38 UTC
The $IP variable is used in DefaultSettings.php, which means if you change it in LocalSettings.php, you must also override any DefaultSettings.php variable that depends on it.

It seems we we should either:

1. Remove all references to $IP in DefaultSettings.php, and use Setup.php (e.g. how $wgStyleDirectory works).
2. Document that $IP is now an internal variable and should not be set in LocalSettings.php.
Comment 1 Brion Vibber 2013-09-25 14:25:26 UTC
$IP has already been used to load a bunch of code in WebStart.php long before LocalSettings.php is loaded -- it's WAY too late to change $IP there.

The only semi-correct way I can see to change it is to set the MW_INSTALL_PATH environment variable which can override the dirname(__FILE__) path, and I'm not 100% convinced that's actually useful for anything in the first place.

Comments in the code seem to indicate it can be used to override expansion of symlinks, but that seems like a wonky idea -- you've already hit at least index.php and includes/WebStart.php from the base directory, so you can't really flip to another version or something.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links