From ba0fc4fa20067528effd4802e53ceeb959640825 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 12 Jan 2012 13:42:29 +0100 Subject: Update to MediaWiki 1.18.1 --- includes/objectcache/DBABagOStuff.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'includes/objectcache') 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; -- cgit v1.2.2