diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-28 16:54:45 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-28 16:54:45 +0000 |
commit | 3f7098c26a85606fa7978b19fe7b1e919deeb1f0 (patch) | |
tree | 1d1b30af54fc25303cf32b437d604d2b1645c331 /wpmu-settings.php | |
parent | b5856cc46c205722b0bb57a4f45f9d2597b8e72e (diff) | |
download | wordpress-mu-3f7098c26a85606fa7978b19fe7b1e919deeb1f0.tar.gz wordpress-mu-3f7098c26a85606fa7978b19fe7b1e919deeb1f0.tar.xz wordpress-mu-3f7098c26a85606fa7978b19fe7b1e919deeb1f0.zip |
Strip "." at the end of hostname. (fixes #156)
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@782 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wpmu-settings.php')
-rw-r--r-- | wpmu-settings.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wpmu-settings.php b/wpmu-settings.php index 1f28ab0..a25c708 100644 --- a/wpmu-settings.php +++ b/wpmu-settings.php @@ -8,6 +8,8 @@ $domain = addslashes( $_SERVER['HTTP_HOST'] ); if( substr( $domain, 0, 4 ) == 'www.' )
$domain = substr( $domain, 4 );
$domain = preg_replace('/:.*$/', '', $domain); // Strip ports
+if( substr( $domain, -1 ) == '.' )
+ $domain = substr( $domain, 0, -1 );
$path = preg_replace( '|([a-z0-9-]+.php.*)|', '', $_SERVER['REQUEST_URI'] );
$path = str_replace ( '/wp-admin/', '/', $path );
|