Commit graph

46 commits

Author SHA1 Message Date
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
Tim Starling
84b6a177f1 * Converted BagOStuff.php from the style of memcached-client.php to the standard MediaWiki style, including camel case, using protected visibility instead of initial underscore, abstract functions instead of stubs, stylize.php.
* In SqlBagOStuff, ignore errors due to a read-only database, per my comments on CR r42796. Same for LocalisationCache. 
* Merged SqlBagOStuff and MediaWikiBagOStuff, that proved to be an awkward and unnecessary generalisation. Use the standard quoting wrapper functions instead of $db->query(). 
* Implemented atomic incr() and decr() functions for SqlBagOStuff. 
* Made incr() and decr() generally work roughly the same as it does in memcached, respecting negative steps instead of ignoring such operations. This allows decr() to be implemented in terms of incr().
* Per bug 11533, in MessageCache.php, don't retry 20 times on a cache failure, that's really memcached-specific and won't be useful for other cache types. It's not really very useful for memcached either.
* Moved MySQL-specific implementations of wasDeadlock() and wasErrorReissuable() to DatabaseMysql.
* Briefly tested page views with $wgReadOnly=read_only=1, fixed an error from Article::viewUpdates(). A CentralAuth fix will be in a subsequent commit.
2009-08-15 03:45:19 +00:00
Niklas Laxström
986c1616bb Consistent letter case 2009-07-30 19:26:18 +00:00
Alexandre Emsenhuber
b9b1d9dc6f * Removed the inclusion of memcached-client.php since this file is autoloaded
* Document a bit
2008-11-14 22:45:32 +00:00
Aaron Schulz
dd6cb210ae objectcache cleanup (bug 7474) 2008-09-27 22:51:59 +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
Tim Starling
3444f2926e No need for a second newline 2008-04-09 15:23:00 +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
Rob Church
4331d13d87 * (bug 10181) Support the XCache object caching mechanism [patch from Kurt Radwanski]
* Minor tweak to installer form
2007-06-08 15:56:32 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Brion Vibber
b66817530c Revert r16928: crashed Wikimedia by breaking memcached 2006-10-11 22:41:38 +00:00
Tim Starling
e64ea90020 Bug 7474, CACHE_DB/CACHE_MEMCACHED confusion 2006-10-11 08:12:15 +00:00
Tim Starling
3005679b0e * Removed lots of explicit require_once statements. The autoloader should theoretically be faster, because it always uses an absolute path, eliminating the need for a search, and it is never called unnecessarily. Absolute paths are also more robust in the face of odd configurations or usage patterns. Moved a few constants around to support this, they always have to be available before the method call.
* Deleted DatabaseMysql.php, no longer necessary, database classes are autoloaded. 
* Moved wfGetMimeMagic() to MimeMagic::singleton()
* Fixed a couple of __CLASS__.'::'.__FUNCTION__ things.
2006-10-03 13:00:52 +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
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Domas Mituzas
73bcdd7a90 Add APC shared memory caching support, for those who desperately need it.
It doesn't mean that it is any faster than MySQL-based object cache %)
2006-05-28 16:44:16 +00:00
Domas Mituzas
e86273163e add knob for persistent MC connections 2006-02-19 09:55:20 +00:00
Domas Mituzas
8aabcc03d1 Be less anal about entry points, class definitions do no harm to anyone, defined() is expensive 2006-01-14 11:04:04 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00
Brion Vibber
b0c41ad13b * (bug 2885) Fix fatal errors and notices in PHP 5.1.0beta3
* (bug 2931) Fix additional notices on reference use in PHP 4.4.0
2005-07-22 11:29:15 +00:00
River Tarnell
f6a6230890 try disabling persistant connections 2005-07-07 03:01:35 +00:00
Antoine Musso
157861bc31 fix some issues with phpdoc 2005-07-05 21:22:25 +00:00
River Tarnell
1f2587c66f don't try to redeclare classes 2005-07-02 23:50:09 +00:00
Ævar Arnfjörð Bjarmason
c4855d9284 * Add a trailing newline in die() 2005-04-13 08:18:35 +00:00
Ævar Arnfjörð Bjarmason
273671cf32 Adding cache related stuff to a new 'Cache' subpackage 2005-04-12 01:29:21 +00:00
Tim Starling
52a4214b20 Smarter, more flexible cache type selection. Moved entire contents of ObjectCache.php to BagOStuff.php, to make way for some more generic code. 2005-04-09 10:30:45 +00:00
Tim Starling
0cc1d7fd54 Don't clear objectcache on every query, I doubt there was any good reason for doing so 2005-03-27 17:26:55 +00:00
Brion Vibber
3caa8e7404 eAccelerator caching support, patches from Jamie Bliss 2005-03-02 01:54:05 +00:00
Brion Vibber
90d50200e8 * (bug 1431) Avoid redundant objectcache garbage collection
Based on zigger's patch: http://bugzilla.wikimedia.org/attachment.cgi?id=238&action=view
2005-02-07 03:03:26 +00:00
Evan Prodromou
4b42f18b66 Removed CVS keywords from files, to make merging between branches
easier. Interpolated keywords cause lots of conflicts and headaches at
merge time for older (<1.12.x) CVS versions.
2004-11-29 18:25:30 +00:00
Brion Vibber
b3ca6226ca Use compression in the objectcache table if zlib support is available.
Since we'll be using this for the parser cache when memcached is not
set up, we'll want to actually put junk in there and saving space is nice.
2004-11-22 01:33:47 +00:00
Tim Starling
d00451fa19 Fixed bug with Turck MMCache wrapper, and made it the default where Turck is installed (except if memcached is specified) 2004-10-23 10:21:23 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Tim Starling
1b8462ac58 Table prefix bugs 2004-08-27 13:40:27 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Tim Starling
bcb4f2c046 New feature: Turck MMCache shared memory as a lightweight, windows-compatible replacement for memcached 2004-08-21 13:59:48 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Brion Vibber
88d7463ce2 The ampersand for references is unnecessary when the function is declared to accept references as parameters. Further, it produces a warning on some PHP versions (such as the 4.3.6 that comes with Fedora Core 2). Removing... 2004-06-12 03:17:39 +00:00
Domas Mituzas
19fd8735e4 * abstraction layer fixups
* use fetchobject instead of fetchrow
* fix time desync between time() and NOW(). use time()
2004-06-11 14:40:52 +00:00
Domas Mituzas
bb35912240 Use DatabaseFunctions layer instead of copy-paste one :) 2004-06-10 13:03:37 +00:00
Brion Vibber
0c2fba0ac4 Add an objectcache table for limited caching when memcached isn't
available. Currently using for the message cache to avoid reading
every message separately. This now is only slightly slower than
memcached in my tests when $wgUseDatabaseMessages is enabled, so
it's a bit of a speedup for common hosts.
2004-05-09 05:12:55 +00:00