From 5c97b54c558d5953f114ca9860bdafc9472d1f10 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 15 Dec 2003 08:02:19 +0000 Subject: [PATCH] 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 --- wp-settings.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 418ea9ae2..ab21a9fb2 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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'); ?> \ No newline at end of file