http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59748

Revision: 59748
Author:   overlordq
Date:     2009-12-04 23:11:28 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/BagOStuff.php
    trunk/phase3/includes/DefaultSettings.php

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2009-12-04 21:59:28 UTC (rev 59747)
+++ trunk/phase3/RELEASE-NOTES  2009-12-04 23:11:28 UTC (rev 59748)
@@ -99,6 +99,7 @@
 * $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 ===
 

Modified: trunk/phase3/includes/BagOStuff.php
===================================================================
--- trunk/phase3/includes/BagOStuff.php 2009-12-04 21:59:28 UTC (rev 59747)
+++ trunk/phase3/includes/BagOStuff.php 2009-12-04 23:11:28 UTC (rev 59748)
@@ -619,7 +619,8 @@
 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 @@
                $this->mFile = "$dir/mw-cache-" . wfWikiID();
                $this->mFile .= '.db';
                wfDebug( __CLASS__ . ": using cache file {$this->mFile}\n" );
-               $this->mHandler = $handler;
+               $this->mHandler = $wgDBAhandler;
        }
 
        /**

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php   2009-12-04 21:59:28 UTC (rev 
59747)
+++ trunk/phase3/includes/DefaultSettings.php   2009-12-04 23:11:28 UTC (rev 
59748)
@@ -776,6 +776,8 @@
 
 $wgParserCacheExpireTime = 86400;
 
+$wgDBAhandler = 'db3';
+
 $wgSessionsInMemcached = false;
 
 /** This is used for setting php's session.save_handler. In practice, you will



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to