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

Revision: 92499
Author:   aaron
Date:     2011-07-18 23:02:14 +0000 (Mon, 18 Jul 2011)
Log Message:
-----------
* Removed getSite()/getLang() from MWMultiVersion.php; unnecessary and adds a 
SiteConfiguration dependency and sucks for HipHop. All this version code should 
be self-contained.
* Added MWScript comment

Modified Paths:
--------------
    trunk/tools/mwmultiversion/wmf-config/CommonSettings.php
    trunk/tools/mwmultiversion/wmf-config/MWMultiVersion.php

Modified: trunk/tools/mwmultiversion/wmf-config/CommonSettings.php
===================================================================
--- trunk/tools/mwmultiversion/wmf-config/CommonSettings.php    2011-07-18 
23:01:08 UTC (rev 92498)
+++ trunk/tools/mwmultiversion/wmf-config/CommonSettings.php    2011-07-18 
23:02:14 UTC (rev 92499)
@@ -94,8 +94,7 @@
 wfProfileIn( "$fname-confcache" );
 
 # Determine domain and language and the directories for this instance
-$site = $multiVersion->getSite( $wgConf ); // must be called *after* $wgConf 
is set
-$lang = $multiVersion->getLang( $wgConf ); // must be called *after* $wgConf 
is set
+list( $site, $lang ) = $wgConf->siteFromDB( $wgDBname );
 $wgVersionDirectory = $multiVersion->getVersion();
 
 # Is this database listed in $cluster.dblist?

Modified: trunk/tools/mwmultiversion/wmf-config/MWMultiVersion.php
===================================================================
--- trunk/tools/mwmultiversion/wmf-config/MWMultiVersion.php    2011-07-18 
23:01:08 UTC (rev 92498)
+++ trunk/tools/mwmultiversion/wmf-config/MWMultiVersion.php    2011-07-18 
23:02:14 UTC (rev 92499)
@@ -186,40 +186,6 @@
        }
 
        /**
-        * Load the site and lang for this wiki from the db name
-        * @param $db string
-        * @param $conf SiteConfiguration object
-        * @return void
-        */
-       private function loadSiteFromDB( $db, SiteConfiguration $conf ) {
-               list( $this->site, $this->lang ) = $conf->siteFromDB( $db );
-       }
-
-       /**
-        * Get the site for this wiki
-        * @param $conf SiteConfiguration object
-        * @return String site. Eg: wikipedia, wikinews, wikiversity
-        */
-       public function getSite( SiteConfiguration $conf ) {
-               if ( $this->site === null ) {
-                       $this->loadSiteFromDB( $this->db, $conf );
-               }
-               return $this->site;
-       }
-
-       /**
-        * Get the lang for this wiki
-        * @param $conf SiteConfiguration object
-        * @return String lang Eg: en, de, ar, hi
-        */
-       public function getLang( SiteConfiguration $conf ) {
-               if ( $this->lang === null ) {
-                       $this->loadSiteFromDB( $this->db, $conf );
-               }
-               return $this->lang;
-       }
-
-       /**
         * Get the DB name for this wiki
         * @return String the database name
         */


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

Reply via email to