Commit graph

36 commits

Author SHA1 Message Date
Tim Starling
be76d86932 * Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class.
* Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). 
* Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. 
* Made all object cache classes derive from BagOStuff. 
* Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension.
* Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches.
* Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used.
* Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff.
* Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB.
* Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches.
* Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff.
* Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class.
* Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore
* Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
Alexandre Emsenhuber
9f5d06527c Part of bug 26280: added license headers to PHP files in maintenance 2010-12-16 19:15:12 +00:00
Antoine Musso
9fdd07b82d Max command length using one line of code
Follow-up r76621 code review
2010-12-04 08:58:32 +00:00
Antoine Musso
0ea43dd530 justify help memcached console help 2010-11-13 10:33:30 +00:00
Chad Horohoe
670602f082 Trying to kill install-utils.inc/old install crap:
* Cripple the old installer (entry point is gone, supporting code immediately exits). Keeping the latter for reference still :)
* Move posix_isatty() wrapper to Maintenance.php, all CLI scripts include this
* Clarify docs on archive() deprecation and removal - hasn't been used going back thru 1.15
* Clarify docs on dbsource() deprecation and removal - was in wide use thru 1.15. 1.16 removed all extension usages
* Move the two PHP bug tests to a file with the other installer files, moved them to more logical places in new install/update sequence
* Remove mw_have_dl/mw_get_session_save_path, zero callers
* Move readconsole() and helpers to be a static method on Maintenance, no extensions have used it since 1.15 either
2010-11-06 22:16:19 +00:00
Sam Reed
659778619c Stylize maintenance folder.. 2010-05-22 16:50:39 +00:00
Alexandre Emsenhuber
0bd52e9050 Avoid "PHP Warning: Division by zero in maintenance/mcc.php on line 92" if there's only a single server 2010-01-23 19:00:56 +00:00
Chad Horohoe
c64f41dd21 Use correct variable name 2010-01-22 18:13:18 +00:00
Chad Horohoe
cb6a63f837 Cleanup needless code duplication 2010-01-22 18:04:40 +00:00
Alexandre Emsenhuber
002fb024b0 * (bug 21403) memcached class renamed to MWMemecached to avoid conflict with PHP's memcached extension
* Put MemCachedClientforWiki in memcached-client.php so that maintenance/mctest.php doesn't crash when $wgMainCacheType is not CACHE_MEMCACHED
Based on a patch by Kim Hyun-Joon
2009-11-20 15:37:28 +00:00
Chad Horohoe
567f244e36 Revert r54244 which was stupid and fix this properly. Require commandLine.inc/Maintenance.php using the full path every time. 2009-08-03 21:56:41 +00:00
Alexandre Emsenhuber
53f770b89f avoid E_NOTICE if only one argument is given to the "get" command 2009-03-14 20:09:48 +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
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
Brion Vibber
d88bf87284 Apply most of the code tweaks from the live site:
* use configured cache servers for mctest.php
* bucket details in mcc.php
* fix input validation and remove debugging code in compressOld
* full ID range for moveToExternal
* fix resolveStubs.php for compatibility with older serialized data
* maximum line length for bar graphs in getLagTimes.php
* recognize specieswiki in rebuildInterwiki.inc
* --purge option to do additional parser-cache purging for purgeList.php
* default changed in MiniDonation extension
* profile unicode cleanup in Xml
* log slow parses in Article.php
* profile wfMsgReal
* log mkdir failures
* profile AutoLoader
* rebuild empty DjVu metadata containing ''
* security fix for DjVu metadata retrieval
2007-01-17 00:54:54 +00:00
Brion Vibber
6fae318406 Remove some stray executable bits 2006-04-04 07:57:48 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Antoine Musso
32dbdf547c better history 2005-12-04 00:00:06 +00:00
Antoine Musso
11ed2df86b 'server' command from live 2005-12-03 18:14:19 +00:00
Antoine Musso
365d5e55c2 implement 'history' command 2005-12-03 17:46:21 +00:00
Antoine Musso
ef4ea1ee11 dumb help messages. FIXME 2005-12-03 17:41:34 +00:00
Antoine Musso
2c529dd068 code formatting 2005-12-03 17:02:22 +00:00
Brion Vibber
47b6c60638 Committing live hack: enable memcached debug mode in mcc tester 2005-08-17 20:05:22 +00:00
River Tarnell
c3a7c7a4e1 error handling is your friend 2005-07-07 02:29:55 +00:00
River Tarnell
e4a87e105a implement "action=render" 2005-07-03 04:00:33 +00:00
Tim Starling
c69b7ca3f3 a couple of extra functions, useful for debugging 2004-09-25 16:54:31 +00:00
Antoine Musso
6bbcf091bf Phpdoc comments and place holder. Part of the subpackage "maintenance", archives in subpackage "maintenanceArchive" 2004-09-03 20:33:01 +00:00
Brion Vibber
be2913ebc8 Add a comment explaining what this is for :) 2004-08-11 09:40:44 +00:00
Tim Starling
f48ddd1366 using new commandLine.inc style, readconsole() moved to install-utils() 2004-06-13 04:36:53 +00:00
Tim Starling
595fa488da updated to work with new client 2004-06-01 07:42:32 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Tim Starling
bc2120f9c0 Various enhancements 2003-11-30 08:21:40 +00:00
Tim Starling
17428f7d2f Support for systems without readline 2003-11-21 05:00:22 +00:00
Tim Starling
f814d27dfe MemCached command line client 2003-10-20 13:41:43 +00:00