Commit graph

226 commits

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