From: daniel Date: Wed, 12 Dec 2012 14:13:23 +0000 (+0100) Subject: (minor) Always use getSites() to get sites. X-Git-Tag: 1.31.0-rc.0~21306^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=761f6028e89571b461470830bbd6d3d8992c1375;p=lhc%2Fweb%2Fwiklou.git (minor) Always use getSites() to get sites. Change-Id: If6acf458a762a3de6096f35f231d50ba59ed3256 --- diff --git a/includes/site/Sites.php b/includes/site/Sites.php index a0ebfc1dcf..edd3d64cc0 100644 --- a/includes/site/Sites.php +++ b/includes/site/Sites.php @@ -184,11 +184,9 @@ class Sites { * @return Site|false */ public function getSite( $globalId, $source = 'cache' ) { - if ( $source === 'cache' && $this->sites !== false ) { - return $this->sites->hasSite( $globalId ) ? $this->sites->getSite( $globalId ) : false; - } + $sites = $this->getSites( $source ); - return SitesTable::singleton()->selectRow( null, array( 'global_key' => $globalId ) ); + return $sites->hasSite( $globalId ) ? $sites->getSite( $globalId ) : false; } }