aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2006-07-23 20:59:41 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2006-07-23 20:59:41 +0000
commit185702fd5de5c7dfa9761ff0e79b7b410bcd1554 (patch)
tree1f4c3ab2a399dcc97b874f43aef7a5edf439075b /phpBB/common.php
parent4680dfce39f98f9953dea493af8c2245e0570649 (diff)
downloadforums-185702fd5de5c7dfa9761ff0e79b7b410bcd1554.tar
forums-185702fd5de5c7dfa9761ff0e79b7b410bcd1554.tar.gz
forums-185702fd5de5c7dfa9761ff0e79b7b410bcd1554.tar.bz2
forums-185702fd5de5c7dfa9761ff0e79b7b410bcd1554.tar.xz
forums-185702fd5de5c7dfa9761ff0e79b7b410bcd1554.zip
Fixed: if phpBB isn't installed, it redirects to http://host.tld\/install/index.php on my Windows dev server
Changed: instead of undoubling double slashes, we replace any number of consecutive backslashes and forward slashes with a single slash git-svn-id: file:///svn/phpbb/trunk@6204 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index a628dcf1de..0277b356cf 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -124,10 +124,10 @@ if (!defined('PHPBB_INSTALLED'))
$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
}
- // Replace backslashes and doubled slashes (could happen on some proxy setups)
- $script_name = str_replace(array('\\', '//'), '/', $script_name);
+ // Replace any number of consecutive backslashes and/or slashes with a single slash
+ // (could happen on some proxy setups and/or Windows servers)
$script_path = trim(dirname($script_name)) . '/install/index.' . $phpEx;
- $script_path = str_replace('//', '/', $script_path);
+ $script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
$url = (($secure) ? 'https://' : 'http://') . $server_name;