Smilie fix from Jaykul, changed fool's siteurl fix to use faster preg_replace. Now handles *any number* of trailing slashes. :)

git-svn-id: http://svn.automattic.com/wordpress/trunk@612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-12-15 08:02:19 +00:00
parent 54bda8c55f
commit 5c97b54c55
1 changed files with 4 additions and 7 deletions

View File

@ -6,7 +6,6 @@ require ($abspath . 'wp-config-extra.php');
require ($abspath . $b2inc . '/wp-db.php');
require ($abspath . $b2inc . '/functions.php');
require ($abspath . $b2inc . '/template-functions.php');
require ($abspath . $b2inc . '/vars.php');
require ($abspath . $b2inc . '/class-xmlrpc.php');
require ($abspath . $b2inc . '/class-xmlrpcs.php');
require ($abspath . '/wp-links/links.php');
@ -40,12 +39,8 @@ if (!isset($_wp_installing) || !$_wp_installing) {
$siteurl = get_settings('siteurl');
// "When trying to design a foolproof system,
// never underestimate the ingenuity of the fools :)"
//
// Strip trailing slashes from $siteurl. But don't do
// anything that could cause an infinite loop.
while (('/' == substr($siteurl, -1)) && (10 > $i++)) {
$siteurl = substr($siteurl, 0, -1);
}
$siteurl = preg_replace('|/+$|', '', $siteurl);
$blogfilename = get_settings('blogfilename');
$blogname = get_settings('blogname');
$blogdescription = get_settings('blogdescription');
@ -102,4 +97,6 @@ if (!isset($_wp_installing) || !$_wp_installing) {
$cookiehash = md5($siteurl);
} //end !$_wp_installing
require ($abspath . $b2inc . '/vars.php');
?>