mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Do not overwrite $MYSITE unless the new version actually exists
This commit is contained in:
@@ -375,10 +375,16 @@ if (!isset($MIRRORS[$MYSITE])) {
|
||||
// the browser (in the Host HTTP header).
|
||||
|
||||
if($_SERVER["SERVER_PORT"] != '80') {
|
||||
$MYSITE = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["SERVER_NAME"]) . ':' . (int)$_SERVER["SERVER_PORT"] . '/';
|
||||
$tmp = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["SERVER_NAME"]) . ':' . (int)$_SERVER["SERVER_PORT"] . '/';
|
||||
} else {
|
||||
$MYSITE = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["SERVER_NAME"]) . '/';
|
||||
$tmp = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["SERVER_NAME"]) . '/';
|
||||
}
|
||||
|
||||
// If the name without www. exists, use it
|
||||
if (isset($MIRRORS[$tmp])) {
|
||||
$MYSITE = $tmp;
|
||||
}
|
||||
|
||||
// If the mirror is not registered with this name, provide defaults
|
||||
// (no country code, no search, no stats, English default language ...)
|
||||
if (!isset($MIRRORS[$MYSITE])) {
|
||||
|
||||
Reference in New Issue
Block a user