Commit graph

30 commits

Author SHA1 Message Date
Chad Horohoe
5b1985f117 Tweak comment, we don't create LS in the conf dir anymore, you have to upload it 2011-02-26 12:56:32 +00:00
Max Semenik
1fdaf8db17 (bug 1379) Installer directory conflicts with some hosts' configuration panel.
Renamed config/ to mw-config/, however left aliases for b/c.
2011-02-26 12:35:23 +00:00
X!
3589532db4 Per my comment on r68760: Make MWfunction class, complete with call_user_func helper functions that automatically
make the callback PHP 5.1 compatible with the Class::Method syntax. Add Unit tests to supplement it.
2011-01-02 06:48:07 +00:00
Roan Kattouw
195217ba89 (bug 26130) Revert changes to WebStart.php in r72349, which turn out to have been misguided. This should fix double-gzip issues 2010-12-06 20:57:42 +00:00
Tim Starling
07bb8ce5b5 Remove some of the rubbish that has been accumulating in the default LocalSettings.php for years, especially code as opposed to configuration data:
* Don't set $IP. The entry point already sets it, so there's no point. Users can still set it if they can figure out a way to do it without breaking things.
* Don't include DefaultSettings.php. Doing that is code, not configuration, and it can easily be done in WebStart/Maintenance. Some non-standard entry points in extensions may be broken by this. That's their fault for being non-standard. Backwards compatibility is preserved thanks to require_once().
* Introduce $wgInvalidateCacheOnLocalSettingsChange, which when set, causes $wgCacheEpoch to be updated in the way that it previously was in the default LocalSettings.php.
* Don't set $wgLocalInterwiki to some nonsense value (possibly including spaces and punctuation in the new installer). It should be only for actual interwiki prefixes. Since most wikis don't have them, I set this to false by default and adjusted the referring code to accept this. 
* Removed the guard for web invocation with $wgCommandLineMode set. This ancient code is redundant with modern protections in doMaintenance.php. 
* In DefaultSettings.php, fixed fold terminator placement near $wgLoadScript
* Add a web entry point guard. That's one piece of code which really is necessary.
2010-12-06 15:00:56 +00:00
Daniel Friesen
ad787f1574 Add MW_CONFIG_FILE support to load a separate config file instead of LocalSettings.php, similar functionality to MW_CONFIG_CALLBACK but works in some cases that it doesn't. 2010-12-05 06:43:15 +00:00
Chad Horohoe
0138b0952b Followup r68760: add comment 2010-10-18 22:37:44 +00:00
Priyanka Dhanda
cb57d56d8b * WebStart.php and SeleniumWebSettings.php allow include files and global config variables to be set based on the testsuite being run. See discussion in http://www.mediawiki.org/wiki/SeleniumFramework#Test_Wiki_configuration
* Let test suites run without logging in.
2010-10-14 16:38:40 +00:00
Siebrand Mazeland
d088f079e3 Remove some references to no longer supported PHP version.
Also add a FIXME for a check in DefaultSettings.php and fix indentation in install-utils.inc.
2010-10-02 22:22:12 +00:00
Roan Kattouw
32377424b9 Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html>. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail. 2010-09-04 04:00:09 +00:00
Alexandre Emsenhuber
7b79d94515 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-14 17:42:40 +00:00
Tim Starling
b40efbc094 Fix URL for $GLOBALS overwrite vulnerability. 2010-07-20 02:17:18 +00:00
Mark A. Hershberger
46d9887336 r68756 - Make the use of MW_CONFIG_CALLBACK compatible with PHP 5.1 2010-06-30 04:25:23 +00:00
Aaron Schulz
248c17383d Removed StartProfiler.php from SVN control and added StartProfiler.sample file. The sample file can be moved to the former name to set profiling. MW will fall back to ProfilerStub.php as usual if there is no StartProfiler.php. 2009-05-07 18:30:26 +00:00
Chad Horohoe
893b41431c Remove last of ini_set() for allow_url_fopen. This hasn't worked since PHP 4.3.4, when it became a PHP_INI_SYSTEM setting. 2009-04-21 16:02:45 +00:00
Tim Starling
8b46714f66 Check for PHP 5.0.x bug *after* checking for PHP 4, so that we don't claim that the user needs to upgrade from 5.0 to 5.1 when in fact they're running PHP 4. 2008-11-07 16:38:01 +00:00
Tim Starling
0d322a394e * Allow $wgDiff3=false
* Don't call quickUserCan('edit') unless section edit is enabled
* In DatabasePostgres and DatabaseSqlite: throw an exception on connection error
* In DatabasePostgres: don't send an invalid connection string whenever one of the fields is empty. Use quoting.
* In Database: make the captured PHP error prettier
* Display a descriptive error message when the user navigates to index.php with PHP 4, not a parse error. Check to see if the *.php5 extension works, using file_get_contents().
* The default port number for PostgreSQL is 5432, not blank.
* Better default for $wgDBname
2008-10-06 00:45:18 +00:00
Tim Starling
c6b902f180 * Reorganised the includes directory, creating subdirectories db, parser and specials
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.
2008-06-16 20:21:26 +00:00
Niklas Laxström
a2d0800d6b * Full path for script includes, this time should work with installations using symlinks
* Some documentation
2008-05-16 17:53:29 +00:00
Daniel Friesen
b1585c7942 Revert 34558/34588. Use of an absolute path specified by __FILE__ breaks anyone using the symlink style of installation and relies on the assumption that the MediaWiki code is always located a directory above the LocalSettings.php file (Even Wikia doesn't follow this) 2008-05-14 11:17:54 +00:00
Rotem Liss
2968d3969a For compatibility (DefaultSettings.php currently crashes when LocalSettings.php doesn't exist). 2008-05-10 16:29:19 +00:00
Niklas Laxström
d10e6a4298 * Use full path 2008-05-10 09:34:27 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Tim Starling
50eb8b5da4 profiling 2007-04-15 00:20:24 +00:00
Tim Starling
28dc3ec888 * Moved the main ob_start() from the default LocalSettings.php to WebStart.php.
The ob_start() section should preferably be removed from older 
  LocalSettings.php files.
* Give Content-Length header for HTTP/1.0 clients.
* Partial support for Flash cross-domain-policy filtering. Text entry points should be protected, but uploads are not.
2007-02-19 23:03:37 +00:00
Ilmari Karonen
305522e4e6 Detect PHP 5.0.x 64-bit bug and abort in WebStart.php; too many things break
mysteriously otherwise (detection code copied from install-utils.inc)
2006-12-17 13:40:28 +00:00
Brion Vibber
a898dff34e * Improved register_globals paranoia checks 2006-10-11 18:14:27 +00:00
Tim Starling
558487ceac Active protection against register_globals vulnerabilities. Unset all globals which have been set by $_REQUEST, in WebStart.php. All entry points must assume that a user can unset any arbitrary global set before WebStart.php is invoked. This is not usually a problem since most entry points do not set globals before WebStart.php, Yuri's APIs apparently being the only exceptions. 2006-10-11 03:44:49 +00:00
Tim Starling
3ea576aa25 Consolidated web initialisation code into includes/WebStart.php. Moved profiling setup to a hook file "StartProfiler.php", following Brion's suggestion to merge Wikimedia's early profiling patch into subversion. Renamed Profiling.php and logProfilingData(), removed unnecessary wfProfileClose() calls. 2006-07-14 05:35:31 +00:00