diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-01-12 13:42:29 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-01-12 13:42:29 +0100 |
commit | ba0fc4fa20067528effd4802e53ceeb959640825 (patch) | |
tree | 4f62217349d3afa39dbba3f7e19dac0aecb344f6 /includes/objectcache/DBABagOStuff.php | |
parent | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (diff) |
Update to MediaWiki 1.18.1
Diffstat (limited to 'includes/objectcache/DBABagOStuff.php')
-rw-r--r-- | includes/objectcache/DBABagOStuff.php | 11 |
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; |