mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
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
This commit is contained in:
parent
4680dfce39
commit
185702fd5d
1 changed files with 3 additions and 3 deletions
|
@ -124,10 +124,10 @@ if (!defined('PHPBB_INSTALLED'))
|
||||||
$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
|
$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace backslashes and doubled slashes (could happen on some proxy setups)
|
// Replace any number of consecutive backslashes and/or slashes with a single slash
|
||||||
$script_name = str_replace(array('\\', '//'), '/', $script_name);
|
// (could happen on some proxy setups and/or Windows servers)
|
||||||
$script_path = trim(dirname($script_name)) . '/install/index.' . $phpEx;
|
$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;
|
$url = (($secure) ? 'https://' : 'http://') . $server_name;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue