Commit graph

387 commits

Author SHA1 Message Date
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
Shinjiman
648bfbabc0 * (bug 10837) Introducing the StubUserVariant class to determine the variant variable instead of using this to overrules the user language preference. 2009-05-30 19:49:51 +00:00
Robin Pepermans
45e9b032ec Update per r50782:
* Remove all $wgAllowRealName, check $wgHiddenPrefs instead
* Make $wgAllowUserSkin obsolete too, check $wgHiddenPrefs instead
* And also only call globals if really needed, and remove unused globals
2009-05-24 12:09:15 +00:00
Chad Horohoe
c458e633de (bug 18761) Add setting to hide a list of preferences. 2009-05-19 17:07:46 +00:00
Alexandre Emsenhuber
998f036bec If passing a callback in an array in $wgExtensionFunctions, fix the profile name to not have 'Setup.php-extensions-Array' 2009-05-06 20:02:01 +00:00
Alexandre Emsenhuber
0ec69aed3b * (bug 18009) $wgHooks and $wgExtensionFunctions now support closures
* Whitespaces fixes in includes/Hooks.php
2009-04-06 12:41:20 +00:00
Aaron Schulz
da25eed393 (bug 17180) Disable $wgShowIPinHeader if static caching is enabled 2009-01-27 19:58:26 +00:00
Chad Horohoe
b9987c3c63 (bug 17180) Go ahead and disable $wgShowIPinHeader if we're using $wgUseFileCache. 2009-01-27 19:53:20 +00:00
Brion Vibber
ecf0df92fb Revert r44814 "code style tweaks" -- removal of class_exists check breaks actual maint scripts 2008-12-23 23:34:35 +00:00
Aaron Schulz
7fbd29d170 Code style tweaks 2008-12-19 22:32:36 +00:00
Andrew Garrett
01f9908a0f Configure extension: With DB handler, defer wfConfigureSetup() to a new hook, SetupAfterCache, which, as the name implies, is executed in Setup.php, after caches are initialised.
This avoids some weird issues with Configure and maintenance scripts.
2008-12-10 23:15:50 +00:00
Aaron Schulz
a5b4105921 Tweak check order to be slightly better 2008-12-09 02:55:49 +00:00
Ilmari Karonen
34fb6297cd Step 2 in NS_IMAGE -> NS_FILE transition (bug 44) (WARNING: huge commit).
This is a global search and replace of NS_IMAGE and NS_IMAGE_TALK with NS_FILE and NS_FILE_TALK respectively in all core files, excluding those already updated in step 1 (r44004).
2008-12-01 17:14:30 +00:00
Ilmari Karonen
d247d88f7d (bug 44) make 'Image' and 'Image_talk' compatibility aliases work for all languages, not just English 2008-11-27 20:27:05 +00:00
Tim Starling
90ed80443e (bug 12586) Use wfHostname() everywhere, remove $wguname and $wgNodeName. Use getenv('COMPUTERNAME') on Windows. 2008-10-06 07:30:38 +00:00
Tim Starling
c69d5d46e8 Proposed fix for bug 14944, specifically the reports that some servers do not have en_US.UTF-8. Make the locale configurable via $wgShellLocale. Detect available locales and set $wgShellLocale to an appropriate value on install. Also fixes safe_mode putenv() warnings. RELEASE-NOTES entry will go to 1.13. 2008-09-29 10:19:11 +00:00
Aaron Schulz
e8215b27e4 Add newuser log to core 2008-09-13 00:29:33 +00:00
Chad Horohoe
a469f0dae1 Self-revert 40530, 40531. Too many things still depend on $_GET and $_POST. Needs more cleanup before this can be put in place. 2008-09-08 13:48:07 +00:00
Chad Horohoe
40618e0c3e * Add getCookie() method to WebRequest as a wrapper for $_COOKIE. Updated all instances of $_COOKIE to use this.
* Switch from running fix_magic_quotes() on $_COOKIE and $_GET/$_POST to running it on $this->cookies and $this->data. Should keep us from interfering with other programs that might do the same (and/or trying to start up a second WebRequest object). This partially fixes bug 11558.
* Todo: Do similar things with $_SERVER/$_ENV and switch to a lazy-load style, rather than on every new WebRequest.
2008-09-06 12:38:34 +00:00
Tim Starling
9e103d3dc3 Reverting r40323, as per comments on wikitech-l. Deprecated doesn't mean removed. It doesn't even mean it'll be removed in the future. It just means you shouldn't use it. 2008-09-03 02:28:41 +00:00
Chad Horohoe
85eee307b2 Fully deprecate $wgProxyKey. Has been marked as deprecated since 1.4, but never seems to have been done. Sites with $wgProxyKey set will continue to use the setting (added a fallback in Setup). Fixes bugs 9258 and 12089. 2008-09-02 15:15:54 +00:00
Tim Starling
d3f99b0811 Make it a lot harder to unprotect the MediaWiki namespace. In response to cs.wikinews.org screwup. 2008-08-31 13:03:30 +00:00
Brion Vibber
e2f1a14d9e * $wgAjaxSearch has been removed; use $wgEnableMWSuggest instead.
I never liked the take-over-the-screen UI of the old ajax search; the new suggestion search does the same thing in a more natural, integrated way.
2008-08-20 18:11:59 +00:00
Tim Starling
e3cc5d722f Don't limit setlocale() hack to PHP 5.2.6, as per comment on bug 14944. 2008-08-08 09:37:22 +00:00
Tim Starling
6e0d253f6d Workaround for PHP 5.2.6 escapeshellcmd()/escapeshellarg() bug 2008-08-08 03:32:54 +00:00
Brion Vibber
75b58962c6 Revert r38221, 38238 -- "Add new parser function {{apiurl}}. Also, add new global $wgApiScript because manually constructing the api script's path seemed like a bad idea."
I don't really like this in general; the API isn't meant for the UI and there should be little to no call to link to it from body content.

Additionally, I believe we're trying to move all new parser functions to the convention of using the # prefix to avoid conflict with the template namespace.
2008-07-30 19:45:35 +00:00
Chad Horohoe
5fb49ecb12 Add new parser function {{apiurl}}. Also, add new global $wgApiScript because manually constructing the api script's path seemed like a bad idea. 2008-07-30 07:46:25 +00:00
Chad Horohoe
0775a89d73 Allow $wgCookiePrefix to be set by the user. Default is false which keeps current behavior in Setup. Fixes bug 14843. 2008-07-21 21:51:51 +00:00
Daniel Friesen
48019ed554 Some missing changes for the $wgShared(DB|Prefix|Tables) setup:
* $wgCookiePrefix:
** Shared stuff should always come before local stuff when setting the cookie prefix (by my count, if you set $wgSharedDB and $wgDBprefix with the old order, even though your usertable is shared, your cookies would be local and logins wouldn't be shared right.
** Because the user table isn't always shared anymore, we only want shared code when $wgSharedTables has 'user' set inside of it.
** We now have $wgSharedPrefix, this should also be accounted for in the cookie prefix.
* updaders.inc: The logic for the $doUser test has changed since the conditions that the user table is shared has changed. Now when $shared is true we only want to $doUser when we have a shared database and 'user' is being shared, otherwise if $shared is false, we only want to $doUser when there is no shared database, or 'user' is not being shared.

Check MediaWiki.org's $wgSharedDB documentation for those on 1.12, I'll post a link there to a patch I maintain for 1.12.
2008-06-30 05:16:38 +00:00
Alexandre Emsenhuber
a75a0d0457 Remove call to wfSeedRandom(), this function does nothing 2008-06-23 17:33:41 +00:00
Niklas Laxström
c175d9f886 * Actually use $wgMessageCacheType for the MessageCache 2008-06-17 08:14:33 +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
Daniel Friesen
b7f509c7b6 Improve UI for Special:Recentchanges and Special:Recentchangeslinked.
* Allow configuration of the default limit and days links with the variables $wgRCLinkLimits and $wgRCLinkDays.
* When selecting a limit and a days on the special pages, if you use a number not within the default list it will be added to the display.
** The selected limit and days is bolded. (This can be considered the first step for bug 3327)
* Optional other configuration option $wgRCFilterByAge, when enabled the list of days will be filtered so that only links within what $wgRCMaxAge says will be stored in the database will be displayed. Note that this is disabled by default because MediaWiki doesn't quite seam to trim out old entries as quickly as $wgRCMaxAge says it should be and some people appear to use the extra 30days links to display older entries even though $wgRCMaxAge is set to 7days on said wiki.

This should also solve bug 9257.
2008-05-17 16:08:34 +00:00
Daniel Friesen
12e47b7f7b Now that I think about it, we're going to have to set $wgSharedPrefix inside of Setup.php so that it can inherit from a $wgDBprefix inside of LocalSettings.php. 2008-05-07 06:05:26 +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
Tim Starling
fbfb509df5 * Introduced LBFactory -- an abstract class for configuring database load balancers and connecting to foreign DBs.
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB. 
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system. 
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete. 
* Removed the useless force() function. 
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features. 
* Removed ancient benet-specific hack from waitForSlave.php
2008-03-30 09:48:15 +00:00
Tim Starling
b6dba5bcfd * Refactored the parser. See my huge entry in RELEASE-NOTES for details.
* Made it possible to configure the parser class being used, via $wgParserConf.
* Moved defines from the top of Parser.php to either class constants or Defines.php
* Added Parser_DiffTest, a differential parser class for regression testing
* Added Parser_OldPP, a parser class which operates like the parser before this commit. I made one breaking change: a bugfix to avoid losing whitespace when adding MWTEMPLATESECTION markers. 
* Made internal tidy work with PHP 5
* Added the ability to supply a hook for template fetching via ParserOptions. This is handy for testing.
* Updated parserTests.txt to account for the various breaking changes I made. Removed a few parser tests that no longer test for anything useful.
2007-11-20 10:55:08 +00:00
Brion Vibber
9be2c3676a Revert r26281 for the moment. Big patch, changes several existing practices. Will want some public testing and more review before taking it to trunk. 2007-10-01 19:50:25 +00:00
Aaron Schulz
4febfc77c2 *Clean up deletion of revisions and remove some gaps
*Allow blocking of users to hide names
*Implement revision deletion for images/deleted files/deleted revs
*Log deletion set off for now
*Add 'hidden' file dir
*Dissallow merging via undelete (which was inefficient and hard to reverse)
*Use restore points and diffs to special:undelete
*Add a special page to merge pages
*Get changeslist to use tables to avoid ugly formatting
*Add logs into RC for rebuildrecentchanges.php
*Add private logs
*List private logs at specialpages
*Tweak/add some deletion and merge messages
2007-10-01 19:38:28 +00:00
Brion Vibber
983e2d0ff7 * (bug 11355) Fix false positives in Safe Mode and other config detection
when boolean settings are disabled with 'Off' via php_admin_value/php_value
2007-09-17 19:44:15 +00:00
Tim Starling
ca76169bbe * Introduced FileRepoStatus -- result class for file repo operations.
* Ported file delete/restore to the filerepo framework. Some user-visible changes in error reporting. 
* $wgSaveDeletedFiles has been removed, the feature is now enabled unconditionally. Added a "deleted" directory for the default location, protected by a .htaccess file and the practical obscurity of content hashes.
* Fixed bug 2735: "Preview" shown in title bar for action=submit on special pages
* Removed "restore" links from the deletion log embedded in Special:Undelete
* Added img_sha1/oi_sha1 fields, preserved through upload, delete and restore
* Referenced the new oi_metadata etc. fields to preserve metadata across upload and delete/restore.
2007-07-22 14:45:12 +00:00
Brion Vibber
336cb46167 Tweaks to the AJAX license preview:
* Rename 'licence' to 'license' for consistency with the rest of the code.
* The preview code was assuming simple templates with no parameters and no subst:s, which failed on most of the selections used now on Commons. Now doing a full pre-save transform and parse on {{$license}}, just as will be done on the final save.
* When selecting 'None' again after another option, the preview pane is now cleared.

A fun 'todo' might be to also pass the currently selected filename, if any, to the license preview. Some of the templates in use attempt to use the current-page-name variables to include a self-link. At the moment using a hardcoded 'Image:Sample.jpg' for the virtual title on the preview rendering.
2007-07-18 19:19:50 +00:00
Rob Church
1ec212b612 (bug 10520) Preview licences during upload via AJAX 2007-07-14 22:06:01 +00:00
Tim Starling
80991043a9 * De-crappified JS upload dest check feature. Converted to sajax framework. Comprehensive destination checking like the previous behaviour on submission. 500ms typing delay for rate limiting, response cache. Don't display the warning on submission if the user has already seen it via AJAX.
* Added support for static member functions as AJAX callbacks.
* Moved all upload-related javascript to upload.js.
* Needs artwork, see TODO in upload.js.
* Removed UploadForm::showSuccess() as per wikitech-l discussion. Redirect to description page unconditionally.
2007-07-01 18:24:47 +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
Brion Vibber
13b739ec46 * (bug 10387) Detect and handle '.php5' extension environments at install time
Patch by Edward Z. Yang.
2007-06-28 14:50:06 +00:00
Tim Starling
091367e83d Set initialCapital to $wgCapitalLinks by default for the local repository 2007-06-14 16:33:16 +00:00
Tim Starling
ed4303922f Merged filerepo-work branch:
* Added support for configuration of an arbitrary number of commons-style file repositories.
* Split Image.php into filerepo/File.php and filerepo/LocalFile.php
* Renamed Image::getImagePath() to File::getPath()
* Added initial support for timestamp-based file fetching (OldLocalFile), to be expanded upon by aaron.
* Changed the interface for Image/File object creation: use wfFindFile() or wfLocalFile() depending on semantics
* ImageGallery::add() now accepts a title object as the first parameter
* Moved file handling operations on upload from SpecialUpload to File
* Removed path-related functions from ImageFunctions.php. Removed static path accessors from File. 
* Added a Content-Disposition header to thumb.php output
* Improved thumb.php error handling
* Updated the unit test suite to kind of partially work with modern computers. RunTests.php doesn't work just yet. Fixed an actual regression that the test suite detected -- moved some defines to Defines.php where they will be loaded consistently.
2007-05-30 21:02:32 +00:00
Brion Vibber
d9d553fa98 Fix for regression in variant short-URLs...
Cleaned up the new URL parsing code a bit, now able to recognize both $wgActionPaths and $wgVariantArticlePath and interpolate those variables.
Moved that bit into WebRequest::interpolateTitle() function which is called after $wgContLang stub object is created, so it can be used to get the variant list.
I'm not totally happy with all this code, but it works. The variant bits generally creep me out.
2007-05-17 20:02:59 +00:00
Brion Vibber
358793e47b * (bug 3826) Normalize some invalid cookie name characters when setting
up $wgCookiePrefix. Completes application of patch by Anders Kaseorg.
2007-04-25 18:38:11 +00:00
Brion Vibber
6038f9ed00 * Clean up session checks to better handle the case where the session was
opened during the current request. May help with some caching corner
  cases.
2007-02-05 21:42:48 +00:00
Brion Vibber
0b06a4fffc Revert r19529 ('ajax editors list'); per chat w/ hashar I recommend working on this as an extension for now. It seems pretty modular, and should be an ideal candidate for that. 2007-01-21 03:14:06 +00:00
Antoine Musso
ed8e8e5833 Optional feature : 'Ajax show editors' based on an idea by Tim Starling
Merge from hashar's branch.
2007-01-20 21:05:36 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Brion Vibber
fcd353ad19 * Fix regression with default lock file and cache directories; threw visible
warning with open_basedir
2007-01-09 06:35:18 +00:00
Brion Vibber
984ac2288d * Reduce config file clutter by setting various script and upload paths
based on $IP or $wgScriptPath in Setup.php. They can still be explicitly
  overridden in LocalSettings.php if desired...
2007-01-03 08:41:16 +00:00
Aryeh Gregor
69ea9bcf9b (bug 7169) Use Ajax to watch/unwatch articles. Patch by Dan Li with some modification by me. 2006-12-26 23:53:34 +00:00
Brion Vibber
bab6c59d8b * Add AuthPluginSetup hook to override $wgAuth after configuration 2006-11-30 07:47:34 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Brion Vibber
bf63ffaa2c Committed a bunch of live hacks from Wikimedia servers
A few left, but these don't look too evil
2006-10-02 17:04:13 +00:00
Daniel Kinzler
6a64a7eaee Separated ajax search box features from core ajax framework.
Note that ajax search is currently broken (some issue with message parsing)
2006-07-30 10:53:22 +00:00
Tim Starling
3e7155b3db $wgLanguageCode no longer indicates the user language, for that use $wgLang->getCode(). This is necessary because determination of the language code is deferred. 2006-07-26 08:26:51 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Tim Starling
0ade783ae2 Deferred loading of DateFormatter.php and IP.php. Standardised IP.php function naming style. 2006-07-14 17:02:49 +00:00
Tim Starling
8831c8e13d MagicWord initialisation deferred. 2006-07-14 16:36:35 +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
Antoine Musso
71fd92d760 Migrate IP related tools from ProxyTools.php to IP.php
and its own class of static functions
2006-07-12 18:33:21 +00:00
Brion Vibber
f1344b73c6 * (bug 6562) Removed unmaintained ParserXml.php for now 2006-07-07 06:04:07 +00:00
Rob Church
9131716360 * (bug 6504) Allow configuring session name with $wgSessionName 2006-07-04 04:20:14 +00:00
Tim Starling
2ff288720c Various performance and initialisation issues:
* Made autoloader work for unserialize()
* Made XmlFunctions.php and HttpFunctions.php autoloadable modules, via Http:: and Xml::
* Made Image class autoloadable, global functions moved to ImageFunctions.php where they can be loaded on every invocation.
* Removed some unnecessary require_once() calls
* Deferred $wgValidSkinNames initialisation
* Fixed a couple of silly construct/initialise splits. My idea from C++ experience, bad practice in PHP.
* Deferred skin initialisation in ParserOptions
* Removed $wgMwRedir during an attempt to make MagicWord autoloadable. Didn't complete that, but removing the global is still the right direction.
2006-07-02 15:57:59 +00:00
Tim Starling
d2b2d1e7eb Experimental: use absolute paths in require_once 2006-07-01 07:22:59 +00:00
Brion Vibber
908c51e127 Revert to r15092; massive breakage, unable to connect to MySQL at all 2006-06-27 16:11:47 +00:00
Greg Sabino Mullane
ef89ec541c Add concept of a distinct port separate from a server.
Add some functions to DatabasePostgres.php.
2006-06-27 15:37:35 +00:00
Tim Starling
adaf195148 Defer initialisation of the special page list, allow autoloading of the SpecialPage class. SpecialPage.php is not loaded for ordinary page views. Implemented some interfaces which allow special pages to do the same thing, although backwards compatibility is maintained. Old special page extensions will load SpecialPage during initialisation, so all extensions will have to be ported to get the full performance benefit. 2006-06-25 08:38:17 +00:00
Domas Mituzas
9ed354c5c7 revert back to 14660 2006-06-08 15:12:26 +00:00
Domas Mituzas
7b8c86bdb2 AutoLoad OutputPage, HistoryBlob, Block, MessageCache, move $wgBlobCache to HistoryBlobStub static private. 2006-06-08 14:11:16 +00:00
Domas Mituzas
abd7248709 Autoload Linker, Skin.php, move $wgValidSkinNames to static private at Skin, use Skin::getSkinNames()... 2006-06-08 13:47:38 +00:00
Domas Mituzas
b9dbaffd29 move autoloading up :) 2006-06-08 13:27:11 +00:00
Domas Mituzas
9ff370792b woo, revert the revert, apc 3.0.8 seems to work with this :) 2006-06-08 13:08:22 +00:00
Domas Mituzas
01c5458779 revert r14636, private static arrays seem to crash APC on half of our boxen, will have to investigate (or ask nicely Tim to help there) 2006-06-07 13:58:51 +00:00
Domas Mituzas
d49e267925 autoload Profiling, ParserCache, WebRequest 2006-06-07 12:26:58 +00:00
Domas Mituzas
f8b70b6603 AutoLoad Title.php, move global cache arrays to static Title:: variables 2006-06-07 11:44:10 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Tim Starling
410986abf8 Some initial work on exceptions. More to follow. 2006-06-06 23:07:26 +00:00
Domas Mituzas
1aacbbf476 autoload WikiError 2006-06-06 11:51:31 +00:00
Domas Mituzas
b641266605 AutoLoad LinkCache & LinkBatch 2006-06-06 11:36:38 +00:00
Domas Mituzas
06e4640d8c AutoLoad Article 2006-06-06 11:29:23 +00:00
Domas Mituzas
4c31c13252 Welcome back AutoLoader, this time in small batches :-) 2006-06-06 09:50:01 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Brion Vibber
2fb7f4fdb2 To simplify the lives of extension developers, the logging type arrays can now be appended to directly by an extension setup function. It is no longer necessary to write four separate functions just to add a custom log type.
The old hooks for this are retained for backwards compatibility, but are deprecated.
2006-05-25 07:37:20 +00:00
Brion Vibber
ca311c2e4c * PersistentObject removed; it doesn't do anything and was broken besides.
All extensions using it have been corrected.
2006-04-12 08:32:54 +00:00
Brion Vibber
8b36a801ac Live fix: set $wgNodeName 2006-04-02 04:13:23 +00:00
Tim Starling
3e74cd1359 Allow cookies to be shared between multiple wikis with a shared user database. 2006-02-11 07:41:31 +00:00
Brion Vibber
b380b0a76a * Add ".deps.php" include-file preloaders for some dynamically-loaded
language and skin classes. Should help with the broken base-class
  problem under PHP 5 with APC as opcode cache. See details:
  http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html
2006-01-17 23:43:15 +00:00
Brion Vibber
6adf79ec39 * (bug 3990) Use existing session name if session.auto_start is on
Fixes checks for open sessions, such as the cookie warning on login.
  Patch by Zbigniew Braniecki.
2006-01-15 08:05:28 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
Tim Starling
2f49de971c accidentally committed experimental code 2006-01-13 10:29:24 +00:00
Tim Starling
c0dbf45f72 require_once() makes about 20 syscalls in the process of checking if the file has been included before. Moving it outside the loop. 2006-01-13 09:31:51 +00:00
Brion Vibber
86f779f3e9 Temporarily removing Upgrader extension thingy
* including code from DefaultSettings is a no-no
* no release-notes entries for major changes?
* not following code formatting standards
* serial version numbers probably not reliable
* HEAD is our production code; maybe try this separately first?
2006-01-10 20:00:28 +00:00
Magnus Manske
65aa5bab1a New toy: Automatic database upgrades (deactivated by default)
Can create/upgrade database tables for MediaWiki and extensions based on internal version management.
For HOWTO see the beginning of include/Upgrader.php
2006-01-10 12:53:43 +00:00
Brion Vibber
26cc539cac * Skip loading of RecentChange.php except where needed
Moved constants to Define.php; removed unneeded includes until use of RecentChange:: in Article, Log, CheckUser
2006-01-09 21:09:33 +00:00
Tim Starling
3fc92e0c28 removed $wgParserCache, converted to a singleton 2006-01-05 04:26:52 +00:00
Tim Starling
f2a59db33f Removed $wgLinkCache, converted to a singleton. Removed obsolete cruft from LinkCache.php. 2006-01-05 02:05:53 +00:00
Tim Starling
d2adf83131 gave LinkBatch its own file 2006-01-04 23:53:51 +00:00
Tim Starling
837f8137ba Moved stub profiling functions to their own file 2006-01-04 23:17:35 +00:00
Domas Mituzas
b3f01f2070 check if wgProfiler is defined before checking if it is an object
define wfProfileIn/Out only if it was not defined before
2006-01-03 23:38:13 +00:00
Domas Mituzas
e6a511848a allow pre-started Profiler 2006-01-03 10:31:13 +00:00
Tim Starling
93202880e1 arrrggh suppressed fatal 2005-12-30 08:52:45 +00:00
Domas Mituzas
97414f12ee session statistics live patch 2005-12-26 13:08:06 +00:00
Domas Mituzas
214b9a8d40 * move $wgProfiler init to Setup.php
* allow specifying different profiler types
* add ProfilerSimple (that for now just builds in-memory profiling structure,
  may be extended to write it somewhere)
2005-12-24 13:41:05 +00:00
Ævar Arnfjörð Bjarmason
c89ebef38e * require_once 'PersistentObject.php' in the $wg(?:Skin|)ExtensionFunctions loops 2005-12-21 00:13:43 +00:00
Domas Mituzas
ed21293445 AutoAuthenticate hook for external User suppliers 2005-12-20 21:25:54 +00:00
Ævar Arnfjörð Bjarmason
97d93d850c * Use call_user_func( $func ) rather than $func(), like wgHooks and parser hooks 2005-12-14 16:46:27 +00:00
Brion Vibber
0c89efafc4 * (bug 4165) Correct validation for user language selection (data taint) 2005-12-04 10:53:48 +00:00
Tim Starling
55671d7040 Faster IP blocks. Requires schema change. 2005-12-01 10:37:47 +00:00
Tim Starling
9260c3b7ca Deferred initialisation of $wgIP, because it's potentially slow, especially if and when we add the 200 NTL proxies to the trusted XFF list. I was hoping to avoid initialisation altogether for anonymous page views, but that turns out to be difficult because of user_newtalk. It is, however, avoided for action=raw. Tested page view, newtalk, IP registration in history and recentchanges, IP block, autoblock and Special:Version.
Also moved the old proxy scan code from EditPage.php to a more appropriate location in ProxyTools.php.
2005-09-05 02:22:20 +00:00
Ævar Arnfjörð Bjarmason
1877ed135e * No longer passing the name of the language class by reference 2005-08-26 14:05:12 +00:00
Brion Vibber
caf1cb4942 adjust whitespace (spaces -> tabs) 2005-08-16 23:19:54 +00:00
Mr. E23
ea2a812e56 Added dummy wfLogProfilingData() to avoid php warnings when profiling is disabled 2005-08-13 13:23:22 +00:00
Tim Starling
7c900a732a profiling improvements and bug fixes 2005-07-25 07:00:20 +00:00
River Tarnell
a14ffdcfb9 allow 'uselang' and 'useskin' to be specified in the URL parameters, with
some obvious effect.
2005-07-24 06:55:45 +00:00
River Tarnell
e4a87e105a implement "action=render" 2005-07-03 04:00:33 +00:00