Commit graph

252 commits

Author SHA1 Message Date
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