Merge changes Ic13414f0,I26085bfc
[lhc/web/wiklou.git] / includes / SiteConfiguration.php
index 63c3d34..fa871fe 100644 (file)
@@ -317,7 +317,7 @@ class SiteConfiguration {
         * @return bool The value of the setting requested.
         */
        public function getBool( $setting, $wiki, $suffix = null, $wikiTags = array() ) {
-               return (bool)($this->get( $setting, $wiki, $suffix, array(), $wikiTags ) );
+               return (bool)$this->get( $setting, $wiki, $suffix, array(), $wikiTags );
        }
 
        /**
@@ -477,13 +477,13 @@ class SiteConfiguration {
 
                $site = null;
                $lang = null;
-               foreach ( $this->suffixes as $suffix ) {
+               foreach ( $this->suffixes as $altSite => $suffix ) {
                        if ( $suffix === '' ) {
                                $site = '';
                                $lang = $db;
                                break;
                        } elseif ( substr( $db, -strlen( $suffix ) ) == $suffix ) {
-                               $site = $suffix == 'wiki' ? 'wikipedia' : $suffix;
+                               $site = is_numeric( $altSite ) ? $suffix : $altSite;
                                $lang = substr( $db, 0, strlen( $db ) - strlen( $suffix ) );
                                break;
                        }