Commit graph

27 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
Sam Reed
138ddc452f Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 17:42:35 +00:00
Sam Reed
4065e65d03 Even more documentation in various files 2011-05-29 14:24:27 +00:00
Sam Reed
2b676156ba And even more documentation 2011-05-28 18:58:51 +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
c6b0579527 And one error suppression opertator less (per bug 24159) 2010-07-02 19:10:36 +00:00
Alexandre Emsenhuber
bc6cd4d098 * Document a bit
* Fix some doxygen warnings
2010-01-08 21:35:25 +00:00
Andrew Garrett
76635cbaf0 Allow storage of blobs to ES on foreign wikis, by calling ExternalStore::storeToForeignDefault, related changes including adding an associative array parameter to the ExternalStore constructor. Currently this parameter is just used to specify on which wiki the external store is wanted, but could be expanded in future. 2009-03-26 13:28:22 +00:00
Aaron Schulz
6a3ee211d2 (bug 15391) catch DBQueryError too 2009-01-13 15:42:10 +00:00
Aaron Schulz
7b2aa9670f * Rename randomInsert() to insertToDefault()
* Use insertToDefault() to insert revisions (talked to brion on this)
2008-09-24 20:30:10 +00:00
Aaron Schulz
4b22cb1c92 Add insertRandom() with failover back. Currently not used just yet. 2008-09-24 18:38:25 +00:00
Brion Vibber
c4bbaf94c0 Revert some recent ES-related changes -- they made behavior much worse when we encountered problems with site_stats updates hanging and stacking up extra open ES connections.
r41230
r41229
r41093
r41091
r41092
r41086
r41063
r40696

Also reverted r41231 which no longer applies
2008-09-24 18:09:22 +00:00
Aaron Schulz
6683eeca5b Another fix for r41086. Don't keep retrying server if connection fails. 2008-09-24 17:28:55 +00:00
Tim Starling
cd8378a5a6 Revert/rewrite of r40696.
* We used to have parameters to ignore errors, but they're obsolete now that we have exceptions. Implemented ES master failover using exceptions instead. 
* Changing the number of DB connection attempts from 3 to 2 for some random getConnection() calls is almost pointless, adds lots of ugly formal parameters all of the place, and misses the big picture. It should be 2 by default, based on the original rationale. Any reasonable implementation of failover should have zero timeouts per request, by storing state. Changed the default to 2, or 1 if a long timeout is set.
2008-09-21 06:42:46 +00:00
Aaron Schulz
7b61c1972a ExternalStore tweaks:
* On read, spend less time checking on dead slaves
* Add randomInsert() to ES. This does the cluster picking for us
* Make revision text use randomInsert(). On write, fails-over to other clusters as needed instead of throwing db errors
2008-09-10 12:07:56 +00:00
Alexandre Emsenhuber
0c0f20af2a Removed some PHP4-ism 2008-07-19 20:52:53 +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
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
Aryeh Gregor
19cf028aea (bug 12202) Strict standards: mark static methods static. 2008-01-15 14:48:24 +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
72a4abe588 * Skip additional setting of include_path in commandLine.inc (for non-Wikimedia mode)
* Fix some scripts that assumed include_path was set with various additional directories
Stuff now seems to mostly work when not overriding include_path.
Taking that out of LocalSettings is the next step... whee!
2007-06-06 16:01:14 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Lupin
c7408b9223 trailing whitespace removal 2006-03-11 17:13:49 +00:00
Tim Starling
679b0e69b8 Option to write text directly to external storage. 2006-01-09 03:16:56 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Domas Mituzas
a49698b0f7 Add external repositories support for Revision, would
follow url if flag on text set, allows pluggable storage
modules and migration from databases to somewhere
else (huh, other databases ;-)
2005-04-18 17:21:27 +00:00