Making the DBA handler configurable when using CACHE_DBA, still defaults to db3.
authorOverlordQ <overlordq@users.mediawiki.org>
Fri, 4 Dec 2009 23:11:28 +0000 (23:11 +0000)
committerOverlordQ <overlordq@users.mediawiki.org>
Fri, 4 Dec 2009 23:11:28 +0000 (23:11 +0000)
Changed the constructor to only take one optional dir param, the only place it gets called is ObjectCache with no parameters.

RELEASE-NOTES
includes/BagOStuff.php
includes/DefaultSettings.php

index 075fa68..e050a63 100644 (file)
@@ -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 ===
 
index 2ec6153..327bc5a 100644 (file)
@@ -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;
        }
 
        /**
index c1bb33a..c87bc54 100644 (file)
@@ -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