diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2008-08-15 01:29:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2008-08-15 01:29:47 +0200 |
commit | 370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch) | |
tree | 491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/SiteConfiguration.php | |
parent | f4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff) |
Update auf 1.13.0
Diffstat (limited to 'includes/SiteConfiguration.php')
-rw-r--r-- | includes/SiteConfiguration.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index beeeaf15..6cdd5082 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -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 ) ) { @@ -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 { } } } - - |