Add bug and comment for r35609: * (bug 13434) Show a warning when hash identical...
[lhc/web/wiklou.git] / includes / SiteConfiguration.php
index 9efa63a..6cdd508 100644 (file)
@@ -54,7 +54,7 @@ class SiteConfiguration {
                }
                return $retval;
        }
-       
+
        /** Type-safe string replace; won't do replacements on non-strings */
        function doReplace( $from, $to, $in ) {
                if( is_string( $in ) ) {
@@ -83,7 +83,7 @@ class SiteConfiguration {
 
        /** */
        function getBool( $setting, $wiki, $suffix, $wikiTags = array() ) {
-               return (bool)($this->get( $setting, $wiki, $suffix, $wikiTags ) );
+               return (bool)($this->get( $setting, $wiki, $suffix, array(), $wikiTags ) );
        }
 
        /** */
@@ -126,7 +126,11 @@ class SiteConfiguration {
                $site = NULL;
                $lang = NULL;
                foreach ( $this->suffixes as $suffix ) {
-                       if ( substr( $db, -strlen( $suffix ) ) == $suffix ) {
+                       if ( $suffix === '' ) {
+                               $site = '';
+                               $lang = $db;
+                               break;
+                       } elseif ( substr( $db, -strlen( $suffix ) ) == $suffix ) {
                                $site = $suffix == 'wiki' ? 'wikipedia' : $suffix;
                                $lang = substr( $db, 0, strlen( $db ) - strlen( $suffix ) );
                                break;
@@ -142,5 +146,3 @@ class SiteConfiguration {
        }
 }
 }
-
-