Commit graph

309 commits

Author SHA1 Message Date
Alexandre Emsenhuber
6504af3998 Stylise Setup.php 2011-01-14 21:42:38 +00:00
Alexandre Emsenhuber
5a8248974d Group settings modifications at the top of the file 2011-01-06 21:00:17 +00:00
Benjamin Lees
180c128d1e Follow-up to r78285: remove blacklisted file types from $wgFileExtensions in Setup.php, rather than in specials/SpecialUpload.php. 2011-01-06 00:12:49 +00:00
Andrew Garrett
25289a20a2 Follow-up to r64937: expand ternary to conditionals because I hate nested ternaries. 2010-12-09 03:12:28 +00:00
Alexandre Emsenhuber
cb6f556784 * (bug 26253) Removed $wgPostCommitUpdateList
As I said on the bug, this variable is not used since ages
2010-12-06 16:17:43 +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
3e7309606d Implement $wgFooterIcons to replace copyrightico and poweredbyico with a flexible list of icons that can be customized by extensions, hosting, farms, wikimedia, etc...
Implementations for MonoBook, Vector, and Modern. Modern implementation uses text instead of icons as desired.
2010-12-04 20:55:23 +00:00
Chad Horohoe
82f3f815fa Followup r75753, combine these into one if block 2010-11-01 11:50:00 +00:00
Platonides
638bb68480 Don't increment stats when called from the scripts.
This avoids things like PHPUnit opening a db connection just for this due to the default SqDlBagOStuff.
2010-10-31 22:25:29 +00:00
Alexandre Emsenhuber
4aacac8f7f added @file to the file description header 2010-10-02 07:57:43 +00:00
Platonides
32b3fa74f0 Remove $wgIP global, but add a hook instead.
This allows extensions to "make mediawiki ignore ips completely", as requested earlier today in #mediawiki
2010-09-11 13:45:51 +00:00
Trevor Parscal
ce8f81837c Applied patch for bug #25044 by Niklas Laxström -- THANKS! 2010-09-10 21:51:25 +00:00
Mark A. Hershberger
c5caf7d35e re r72335: forgot to include this 'global' keyword. 2010-09-04 00:18:01 +00:00
Chad Horohoe
985e8971c8 Get rid of StubUser. Constructing a user object isn't quite as intensive as it once was. It actually takes more time using the StubUser (construction + unstub on first call) than just initializing User::newFromSession() from the start. Either way, the real overhead starts when you start calling methods (for the nitpicky, the optimization was only about 20µs. The real gain here was eliminating a StubObject) 2010-08-12 17:10:00 +00:00
Niklas Laxström
053b7dcb15 Followup r70515, commiting forgotten file 2010-08-08 06:36:00 +00:00
Chad Horohoe
46668eb156 Fix for r70571, still have to use $_COOKIE here too, $wgContLang is undefined so far 2010-08-06 21:10:18 +00:00
Chad Horohoe
aa7b63ce83 Cleanup getCookie() and use it all over the place instead of using $_COOKIE directly 2010-08-06 15:00:43 +00:00
Chad Horohoe
631208a3db (bug 24687) Remove spurious require() calls. Everything in StubObject is a class and in the autoloader 2010-08-06 12:12:29 +00:00
Max Semenik
27210dc614 Revert r69291, other references-related problems reported 2010-07-13 18:29:33 +00:00
Max Semenik
dd76bb00c8 Fixed weird unit test failures I experienced after r68544 2010-07-12 11:14:00 +00:00
Chad Horohoe
57f473ad83 Deprecated $wgFileStore in favor of $wgDeletedDirectory. Included b/c code for wikis with $wgFileStore still set 2010-07-04 15:56:46 +00:00
Bryan Tong Minh
3136686db6 (bug 24212) Added MediaWiki:ImagePage.css which is also included on foreign client wikis. 2010-07-02 19:54:46 +00:00
Chad Horohoe
a4393915e2 Merge new-installer branch to trunk
* This is not complete yet, and should not be used outside of testing. Using it on a production database may ruin everything. This is the reason for the second entry point of new-index.php. You've been warned. 
* Known issues are at [[mw:New-installer_issues]]. Please add new items to the list if you find them.
2010-05-07 12:25:01 +00:00
Happy-melon
05879eeb55 Rewrite ajaxwatch.js to use the API watch action, and JQuery. Allows it to be used to asynchronise any watch links, not just the watch tab/links/spinny-starry-thing. Will make it nice and easy to add unwatch links to Special:Watchlist, etc. 2010-04-27 15:09:04 +00:00
Trevor Parscal
6e170eadba Added $wgLocalStylePath global variable, and solved bug #22858 by using this new variable in the Vector skin for the inclusion of skins/vector/csshover.htc. HTC files are not cross-domain friendly, so in production environments where $wgStylePath is set to point to bits.wikimedia.org, this will throw JavaScript errors on the page. By adding this new global, which is identical to $wgStylePath except that it will not become customized when $wgStylePath is, we can ensure that certain files, if needed, are always loaded from the same domain as the site. 2010-04-26 21:02:30 +00:00
Bryan Tong Minh
715e685546 $_SERVER['REQUEST_URI'] is not available using IIS with rewrite rules, so use HTTP_X_ORIGINAL_URL as alternative. 2010-04-11 15:38:58 +00:00
Tim Starling
07b4b0b3fc Fix for r61582: if $wgDebugPrintHttpHeaders is false, don't construct the header string and then throw it away, skip the whole code block and save a few microseconds. 2010-01-29 04:29:26 +00:00
Niklas Laxström
b1e2b87b95 New configuration variables $wgDebugTimestamps and $wgDebugPrintHttpHeaders for controlling debug output.
I find these useful, maybe someone else will too.
2010-01-27 17:21:18 +00:00
Bryan Tong Minh
824b9bcfa8 Upload license preview now uses the API instead of action=ajax 2010-01-13 14:28:48 +00:00
Domas Mituzas
df8ab5b2a7 Add $wgExtensionAssetsPath, to decouple js/css/etc serving from $wgScriptPath 2010-01-10 10:19:25 +00:00
Tim Starling
debf8b2eb0 * Fixed the issue of all date functions throwing E_STRICT on their first call due to the default timezone not being set. Used the same approach as phpMyAdmin: utilise PHP's server timezone detection code (which unconditionally throws E_STRICT) with warnings disabled, and store the result with date_default_timezone_set() to avoid future notices. Avoids the need for warning suppression to be dotted all over the codebase, like r58559.
* (bug 2658) Don't use the TZ environment variable at all. Setting it throws an error in some restricted setups. But using it in PHP 5.1+ doesn't make sense anyway, since you'll get the E_STRICT notice described above whenever PHP tries to access it, because Derick hates environment variables. Use date_default_timezone_set().
* If $wgLocaltimezone is null, use the server's timezone as the default for signatures. This was always the behaviour documented in DefaultSettings.php but has not been the actual behaviour for some time: instead, UTC was used by default.
2010-01-08 01:48:53 +00:00
Tim Starling
7688101426 Removed JS2 work (has been moved to the js2-work branch). Has been lightly tested, should mostly work. Some of the more complicated associated changes are listed below.
* Reverted HttpFunctions.php to r45549 and renamed wgSyncHTTPTimeout back to wgHTTPTimeout
* Edited out the asynchronous features from UploadFromUrl. Made fetchFile() use the curlCopy() function from new-upload r47811 instead of Http::doDownload(). Wrote my own URL validity check to avoid having to use either of the two buggy precedents.
* Removed UploadFromChunk
* Removed chunk upload and background status from ApiUpload.php
* Reverted r54669, use of addScriptClass()
* Left getHeadScripts() in its current location (OutputPage) instead of moving it back to SkinTemplate, just added wikibits.js to it to replace the removed addCoreScripts2Top()
2009-11-26 12:00:36 +00:00
Chad Horohoe
bafecbaf4e (bug 21638) Set hashLevels to 2 like commons, just in case 2009-11-25 18:02:03 +00:00
Alexandre Emsenhuber
9e46328edd Fix for r58652: use tabs for indentation, not spaces :) 2009-11-14 13:16:41 +00:00
Daniel Kinzler
8500fd8005 add a version attribute to the <html> tag if RDFa is used with HTML5 2009-11-13 21:58:39 +00:00
Chad Horohoe
049b8db10b Add new global $wgUseInstantCommons for quick && easy enabling of Commons for 3rd party sites using sane defaults 2009-11-06 15:38:47 +00:00
Bryan Tong Minh
91e4d80448 Rewrote Special:Upload to allow easier extension. Mostly backwards compatible towards the end user: tested with Commons' upload scripts.
* Special:Upload now uses HTMLForm for form generation
* Upload errors that can be solved by changing the filename now do not require reuploading.
2009-10-18 19:41:01 +00:00
Chad Horohoe
c319cc8968 (bug 13750) $wgCapitalLinks should be a per-namespace setting 2009-10-09 12:52:16 +00:00
Michael Dale
3d958564ec * Enhanced OutputPage to support js2 style javascript without scriptloader enabled
** loadGM output
** unique request id based on wikiTitle revision / file time
* Moved jsAutoLoadClasses to setup.php ( made conditional )
2009-09-17 01:19:02 +00:00
Tim Starling
c59dd84ce9 More useful debug output for CGI 2009-09-15 06:21:49 +00:00
Tim Starling
0603c609e3 Fixes for r51204: removed useless $wgVariant and StubUserVariant. In Skin::makeGlobalVariablesScript(), use $wgContLang->getPreferredVariant() instead, which is the variant used in the relevant server-side code. 2009-09-02 07:19:35 +00:00
Niklas Laxström
4356486697 Always define mwEmbed i18n file. Was not compatible with manual recaching and the performance impact should not matter. 2009-08-11 18:26:14 +00:00
Michael Dale
7dc42bd170 attempt to fix translatewiki script-loader translate issue. 2009-08-11 18:08:12 +00:00
OverlordQ
30e44a06fc Follow up to r54414 and r54356. Hopefully catches all of the edge cases of erroneous input. On a side note, if PHP is configured with too low a limit it can die before it even reaches the code in Setup.php 2009-08-05 01:33:18 +00:00
Benjamin Lees
37a62ba6e1 Followup to r54406: enable/disable functions were being called in the wrong order (thanks, OverlordQ). 2009-08-05 00:59:50 +00:00
Benjamin Lees
69c5d86763 Add missing semicolons 2009-08-04 23:00:30 +00:00
Benjamin Lees
95328fafaf Suppress warnings when trying to raise the memory limit 2009-08-04 22:58:43 +00:00
Chad Horohoe
1d5874a8c7 (bug 16084) Default memory limit should be increased 2009-08-04 02:47:39 +00:00
Brion Vibber
5cf7c777be * (bug 18751) Fix for buggage in profiling setup for some extensions on PHP 5.1
Patch by GreenReaper: http://bug-attachment.wikimedia.org/attachment.cgi?id=6246
2009-07-19 20:21:28 +00:00
Michael Dale
2d5154e634 * addressed r53282#c3209 moved conditional inclusion of $wgExtensionMessages in mwScriptLoader.php to Setup.php
* put a @ in front of get_headers() should hopefully avoid errors where allow_url_fopen=0
* combined $wgPhpCliPath into the similar used $wgPhpCli var
* minor js & example file mwEmbed fixes
2009-07-15 22:41:56 +00:00