Commit graph

94 commits

Author SHA1 Message Date
Alexandre Emsenhuber
3bbda787b8 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ic1ba00472ef62fa4fd746f8f590fe694d490ecd9
2012-05-20 17:56:43 +02:00
Antoine Musso
9bcf1b9f13 Fix some missing doc groups 2012-02-09 09:34:47 +00:00
Chad Horohoe
de20376cc1 (bug 29747) eAccelerator shared memory caching has been removed since it is now disabled by default and is buggy. APC, XCache and WinCache are not affected.
As Brion points out in <https://bugzilla.wikimedia.org/show_bug.cgi?id=29747#c7>, the shared memory functions are very buggy. In fact, eAccelerator has disabled the shared memory functions by default for awhile now. I didn't touch APC, XCache or WinCache, but I imagine they suffer from the same problems.
2011-11-22 22:56:00 +00:00
Aaron Schulz
c62a8fad5e Updated rc_type documentation 2011-10-29 09:53:55 +00:00
Mark A. Hershberger
6b6526cce0 eol w/s 2011-10-20 15:12:13 +00:00
Roan Kattouw
3fdeb3d2cb Followup r96437: actually define PROTO_INTERNAL 2011-09-07 14:17:42 +00:00
Roan Kattouw
39f8bf86cd Add a PROTO_CANONICAL mode to wfExpandUrl(), which uses $wgCanonicalServer 2011-08-19 15:25:50 +00:00
Platonides
6e87d4001f Follow-up r93258, r93266, r93266: Move the defines to Defines.php 2011-08-03 18:25:04 +00:00
Chad Horohoe
bc827cace5 Move $wgFeedClasses to DefaultSettings where they belong. This has been bothering me for years.
Somewhat in the spirit of r87637, except I didn't put them in WebStart because that doesn't make sense.
2011-06-30 18:16:45 +00:00
Bryan Tong Minh
519d5427e2 Per CR, revert non debugging stuff from r82436. (KML uploads) 2011-06-29 20:31:43 +00:00
Aaron Schulz
c78fa7d720 * Core:
** Made addAutopromoteOnceGroups() put in a user rights log entry
** Added APCOND_ISBOT cond to autopromote and updated some docs
* FlaggedRevs:
** (bug 24948) Made $wgFlaggedRevsAutopromote a wrapper around $wgAutopromoteOnce and removed maybeMakeEditor()/recordDemote() (uses r90749)
** Split off new efSetFlaggedRevsOldAutopromoteConfig function
** Removed calls to FlaggedRevs class in setup function to avoid overhead
** Made cache keys in checkAutoPromoteCond() properly unique
** Made wasPreviouslyBlocked() protected and tweaked editSpacingCheck() param order
2011-06-26 04:12:05 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Happy-melon
602020b1df Move minimum database versions to Defines.php 2011-05-07 15:25:27 +00:00
Happy-melon
7055add799 Centralise the minimum-required-php-version in a MW_MIN_PHP_VERSION constant in Defines.php. This requires loading Defines.php before the PHP4 version checks, so include a big note reminding people not to include anything other than vanilla define() statements in there.
I have a sneaking suspicion that including Defines.php in the entry points might not play nicely with HipHop, but I can't test it (wrong OS).
2011-05-07 15:16:01 +00:00
Happy-melon
fd34d0354b * Implement MW_VERSION constant in Defines.php and use it in preference to $wgVersion. Defines.php will have been loaded anywhere that DefaultSettings.php has been loaded.
* Move the declaration of $wgFeedClasses from Defines.php to WebStart.php
2011-05-07 14:53:08 +00:00
Brion Vibber
8ee5e02054 Followup to r85706 and friends: now that Math messages have been moved to extension, move out the settings list and constants.
* MW_MATH_* constants are now defined in Math extension
* Language::getMathNames() is removed
* mathNames section in message files is removed
* A hardcoded preference override in refreshLinks moved to MaintenanceRefreshLinksInit hook
2011-04-09 19:57:35 +00:00
Tim Starling
7bb50c630a The beginnings of HipHop compiled mode support. It works now for parser cache hits.
* Work around HipHop issue 314 (volatile broken) and issue 308 (no compilation detection) by adding some large and ugly compilation detection code to WebStart.php and doMaintenance.php.
* Provide an MW_COMPILED constant which can be used to detect compiled mode throughout the codebase.
* Introduced wfIsHipHop(), which detects either compiled or interpreted mode. Used this to work around unusual eval() return value in eval.php.
* Work around lack of ini_get() in Maintenance.php, by duplicating wfIsHipHop(). 
* In Maintenance::shouldExecute(), accept "include" as an inclusion function name, since all kinds of inclusion give this string in HipHop.
* Introduced new class MWInit, which provides some static functions in the pre-autoloader environment.
* Introduced MWInit::compiledPath(), which provides a relative path for invoking a compiled file, and MWInit::interpretedPath(), which provides an absolute path for interpreting a PHP file. Used these new functions in the appropriate places.
* When we are running compiled code, don't include files which would generate duplicate class, function or constant definitions. Documented the new requirements on the contents of Defines.php and UtfNormalDefines.php.
* In HipHop compiled mode, it's not possible to have executable code in the same file as a class definition. 
  ** Moved MimeMagic initialisation to the constructor.
  ** Moved Namespace.php global variable initialisation to Setup.php.
  ** Moved MemcachedSessions.php initialisation to the caller in GlobalFunctions.php.
  ** Moved Sanitizer.php constants and global variables to static class members. Introduced an accessor function for the attribs regex, as a new place to put code formerly at file level. 
  ** Moved Language.php initialisation of $wgLanguageNames to Language::getLanguageNames(). Removed the global variable, marked "private" since forever.

* In two places: don't use error_log() with type=3 to append to a file, HipHop doesn't support it. Use file_put_contents() with FILE_APPEND instead.
* Work around the terrible breakage of class_exists() by using MWInit::classExists() instead in various places. In WebInstaller::getPageByName(), the class_exists() was marked with a fixme comment already, so I replaced it with an autoloader solution.
2011-04-04 12:59:55 +00:00
Alexandre Emsenhuber
31fa8b0817 Update doc: Image:: -> File:: 2011-03-15 16:58:06 +00:00
Mark A. Hershberger
ec4dbd13cd Bug #26059 — Add support for KML/KMZ filetype
Patch from Derk-Jan Hartman of which he writes:

    I figured adding kml support would be a breeze, but I had not
    counted on the brain dead browser that is IE6.

    Unfortunately, kml contains the element <heading, which triggers
    the protection in detectScript() that protects from uploads that
    IE6 might mistake for HTML.  It triggers on "<head" not sure if we
    can work around this, but Tim will know.
2011-02-19 03:22:03 +00:00
Chad Horohoe
60e537e774 Fixes for r75545: don't use MEDIAWIKI_INSTALL in the updaters classes, it's not what it's for. Add new DBO_DDLMODE flag which does the same thing (and moved it up to DatabaseUpdater, in case any other children need it) 2011-01-06 19:25:47 +00:00
Tim Starling
725e0f9dad Per CR r77020, followup to r77046: add a constant so that extensions can more easily support versions of MediaWiki without $wgResourceModules. But note that the ClickTracking style of registration would have worked as well, since an array index write works even if the variable is unset. 2010-11-20 07:05:02 +00:00
Platonides
c5f29c3845 Keep it in Title.php Having it on Defines would allow to use it wrong.
Follow up r75379 (r74035, r74034)
2010-10-26 14:08:33 +00:00
Chad Horohoe
890c1c24a1 Followup r74035, add GAID_FOR_UPDATE to the defines for back-compat 2010-10-25 20:25:43 +00:00
Alexandre Emsenhuber
570d1294d3 Fix groupping in comments 2010-10-03 17:37:26 +00:00
Leons Petrazickis
faef1c92c2 DB2: Implemented prepared statements for INSERT and UPDATE to allow more than 32k of text data
DB2: New LIST_SET_PREPARED mode for DatabaseIbm_db2::makeList() that handles ? tokens in prepared UPDATE statement
DB2: General fixes for DB2 database schema
DB2: Factored out foreign key definitions into foreignkeys.sql so that more can be added down the line without messing with the main schema
DB2: Better limit and offset support
2010-09-01 18:14:15 +00:00
Conrad Irwin
a88a955ebf Merge fixes to ?preload= from /branches/conrad/ (cf. bug 5210, r62864, r62035) 2010-03-03 02:41:14 +00:00
Max Semenik
946fec3399 Removed MMCache support, this thing is dead. Partially implements bug 19193 2010-02-16 12:56:02 +00:00
Chad Horohoe
3f35b48b6a Add new define for localisation cache support 2009-10-30 01:51:21 +00:00
Ryan Schmidt
bed5f5d54e * Add autopromote condition APCOND_BLOCKED to autopromote blocked users to various user groups.
* Add $wgRemoveGroups as a means of restricting a group's rights. The syntax is identical to $wgGroupPermissions, but users in these groups will have these rights stripped from them.
* Modify Special:ListGroupRights so that it displays revoked permissions as well (the display of assigned vs. revoked is changeable via css).
* Bump $wgStyleVersion
2009-06-18 02:50:16 +00:00
Jure Kajzer
32af69f8d5 Web installation support for Oracle. 2009-06-08 18:30:27 +00:00
Aaron Schulz
1f3f314609 (bug 14737) Allow the autoconfirmed timer to run from the first edit 2009-01-03 12:53:08 +00:00
Chad Horohoe
cc401646a7 (bug 7492) Allow assignment of rights to specific IPs/ranges 2008-12-14 20:49:19 +00:00
Ilmari Karonen
112f2e6a50 First step in replacing NS_IMAGE with NS_FILE, to match the canonical name change (bug 44).
This step simply defines the new constants NS_FILE and NS_FILE_TALK, retaining NS_IMAGE and NS_IMAGE_TALK as aliases, and makes them usable for export (which seems to be the only part of core that uses the NS_* names as strings). 

The second step should be a global search-and-replace across core (other than Defines.php and Export.php).  I've already tried this locally, and there seem to be no problems.  This step should not touch extensions.

The third, optional step would be updating at least some extensions to use the new constant names as well.  This would generally require prepending the following compatibility snippet to the main extension file:

// The names NS_FILE and NS_FILE_TALK are new in MediaWiki v1.14
if( !defined('NS_FILE') || !defined('NS_FILE_TALK') ) {
	define('NS_FILE', NS_IMAGE);
	define('NS_FILE_TALK', NS_IMAGE_TALK);
}
2008-11-27 22:36:25 +00:00
Daniel Friesen
9c16dab74d Committing todays work on LinkHooks and the link rewrite:
* Cleanup and remove cruft
* Get hooks working
* Get Categories working (whitespace trimming not done)
2008-08-19 04:44:34 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Brion Vibber
4b4ae60c52 A bunch of Unicode constants got moved at some point out of the Unicode normalization library into core Defines.php, breaking the data file generation & testing.
Moved them out to a separate file in the library which can be cleanly included from both places for transparent happiness.
A fresh rebuild & test of UtfNormal data via 'make test' now works fine.
2008-05-08 05:34:48 +00:00
Tim Starling
451e87a875 * Rename wfGetAvailableRights() to User::getAllRights()
* Reintroduce $wgAvailableRights so that the above function is not so terribly slow and broken
2008-05-07 06:42:16 +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
6bfc746e83 * Eliminated message mode (OT_MSG), using OT_PREPROCESS instead. As proposed on wikitech-l.
* Fixed #tag behaviour in preprocess()
* Fixed #tag quote stripping regex
* Made MessageCache::getMessage() never transform its result, that is now left up to the caller. 
* A few other minor changes
2008-01-19 09:03:45 +00:00
Tim Starling
31baa8a17a Added ParserFirstCallInit hook. Deferred function registration in ParserFunctions until this hook is called. 2008-01-17 08:58:24 +00:00
Victor Vasiliev
017a62fa5a Autopromotion:
* Add APCOND_INGROUPS
* Fix comment
* Don't use array_unique() since we have groups as *keys* of $wgAutopromote
2008-01-14 18:52:55 +00:00
Aryeh Gregor
1ed4c2f2a3 Fixes for r28797.
* Mark private methods private using a keyword.
* Reject arrays with count == 2: these will fail when you do array_slice( ... , 1 ).
* Treat xor consistent with the other operations: if there's only one parameter the result should just evaluate that, not always return false; and any number of parameters should be allowed.
* Fail fast on bad input: throw an exception if Autopromote encounters a condition it can't understand (after asking extensions).
* Code documentation!  There were five lines of comments in the original commit.
* APCONDS_INGROUPS is not used, or for that matter defined.
* Editcount should use >=, not >, for consistency with past behavior and intuitiveness.
* "autopromoteUser" sounds like it's actually promoting the user somehow.  Renamed the function to getAutopromoteGroups.
* Make sure we don't return the same group more than once, when we're returning a group.  Probably not going to hurt, but may as well be clean.
2007-12-23 19:53:49 +00:00
Victor Vasiliev
8a7c8bdec6 Introduce new autopromotion system 2007-12-23 11:38:24 +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
Tim Starling
af7be3b1b7 Added EditFilterMerged hook: like EditFilter but uses the text after section merging. This allows ConfirmEdit and SpamBlacklist to share a parse with Article::editUpdates(). Article::prepareTextForEdit() facilitates this sharing. Unfortunately this means that {{REVISIONID}} will no longer work for current page views. 2007-11-12 07:30:40 +00:00
Roan Kattouw
d4ad5a8dbe Reverting r23562: accidentally modified phase3 rather than
branch/apiedit
2007-06-29 20:02:26 +00:00
Roan Kattouw
1a2e663a40 * Separating UI code and DB code in Article::rollback()
* Adding API rollback functionality
2007-06-29 19:55:46 +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
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
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00