summaryrefslogtreecommitdiff
path: root/includes/SiteConfiguration.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/SiteConfiguration.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'includes/SiteConfiguration.php')
-rw-r--r--includes/SiteConfiguration.php10
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 {
}
}
}
-
-