From: OverlordQ Date: Fri, 4 Dec 2009 23:11:28 +0000 (+0000) Subject: Making the DBA handler configurable when using CACHE_DBA, still defaults to db3. X-Git-Tag: 1.31.0-rc.0~38621 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=fd042bfebd5b9f0181956d9e8f7d81c0364939a5;p=lhc%2Fweb%2Fwiklou.git Making the DBA handler configurable when using CACHE_DBA, still defaults to db3. Changed the constructor to only take one optional dir param, the only place it gets called is ObjectCache with no parameters. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 075fa6805b..e050a63c70 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -99,6 +99,7 @@ Hopefully we will remove this configuration var soon) * $wgUseInstantCommons added for quick and easy enabling of Commons as a remote file repository * $wgWikiId added to override default output of wfWikiId() +* $wgDBAhandler added to choose a DBA handler when using CACHE_DBA === New features in 1.16 === diff --git a/includes/BagOStuff.php b/includes/BagOStuff.php index 2ec615369a..327bc5ad98 100644 --- a/includes/BagOStuff.php +++ b/includes/BagOStuff.php @@ -619,7 +619,8 @@ class XCacheBagOStuff extends BagOStuff { class DBABagOStuff extends BagOStuff { var $mHandler, $mFile, $mReader, $mWriter, $mDisabled; - public function __construct( $handler = 'db3', $dir = false ) { + public function __construct( $dir = false ) { + global $wgDBAhandler; if ( $dir === false ) { global $wgTmpDirectory; $dir = $wgTmpDirectory; @@ -627,7 +628,7 @@ class DBABagOStuff extends BagOStuff { $this->mFile = "$dir/mw-cache-" . wfWikiID(); $this->mFile .= '.db'; wfDebug( __CLASS__ . ": using cache file {$this->mFile}\n" ); - $this->mHandler = $handler; + $this->mHandler = $wgDBAhandler; } /** diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c1bb33aa87..c87bc5409e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -776,6 +776,8 @@ $wgParserCacheType = CACHE_ANYTHING; $wgParserCacheExpireTime = 86400; +$wgDBAhandler = 'db3'; + $wgSessionsInMemcached = false; /** This is used for setting php's session.save_handler. In practice, you will