summaryrefslogtreecommitdiff
path: root/includes/objectcache/DBABagOStuff.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-01-12 13:42:29 +0100
committerPierre Schmitz <pierre@archlinux.de>2012-01-12 13:42:29 +0100
commitba0fc4fa20067528effd4802e53ceeb959640825 (patch)
tree4f62217349d3afa39dbba3f7e19dac0aecb344f6 /includes/objectcache/DBABagOStuff.php
parentca32f08966f1b51fcb19460f0996bb0c4048e6fe (diff)
Update to MediaWiki 1.18.1
Diffstat (limited to 'includes/objectcache/DBABagOStuff.php')
-rw-r--r--includes/objectcache/DBABagOStuff.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/objectcache/DBABagOStuff.php b/includes/objectcache/DBABagOStuff.php
index 783cd22b..a273a4f7 100644
--- a/includes/objectcache/DBABagOStuff.php
+++ b/includes/objectcache/DBABagOStuff.php
@@ -6,20 +6,23 @@
* writer locks. Intended for development use only, as a memcached workalike
* for systems that don't have it.
*
+ * On construction you can pass array( 'dir' => '/some/path' ); as a parameter
+ * to override the default DBA files directory (wgTmpDirectory).
+ *
* @ingroup Cache
*/
class DBABagOStuff extends BagOStuff {
var $mHandler, $mFile, $mReader, $mWriter, $mDisabled;
- public function __construct( $dir = false ) {
+ public function __construct( $params ) {
global $wgDBAhandler;
- if ( $dir === false ) {
+ if ( !isset( $params['dir'] ) ) {
global $wgTmpDirectory;
- $dir = $wgTmpDirectory;
+ $params['dir'] = $wgTmpDirectory;
}
- $this->mFile = "$dir/mw-cache-" . wfWikiID();
+ $this->mFile = $params['dir']."/mw-cache-" . wfWikiID();
$this->mFile .= '.db';
wfDebug( __CLASS__ . ": using cache file {$this->mFile}\n" );
$this->mHandler = $wgDBAhandler;