aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-06-09 17:05:52 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-06-09 17:05:52 +0000
commit406895a1ad75167829740deac3f08779104838fb (patch)
treeb875a2652a8bf247204ebb5b19b46f711e13b212 /phpBB/install/install_install.php
parentbd95c0dfa792062feccefdcd936c93793fce2021 (diff)
downloadforums-406895a1ad75167829740deac3f08779104838fb.tar
forums-406895a1ad75167829740deac3f08779104838fb.tar.gz
forums-406895a1ad75167829740deac3f08779104838fb.tar.bz2
forums-406895a1ad75167829740deac3f08779104838fb.tar.xz
forums-406895a1ad75167829740deac3f08779104838fb.zip
#27395
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8636 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r--phpBB/install/install_install.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index f7d6d0a9c4..282afd5e23 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1021,6 +1021,12 @@ class install_install extends module
// HTTP_HOST is having the correct browser url in most cases...
$server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+ // HTTP HOST can carry a port number...
+ if (strpos($server_name, ':') !== false)
+ {
+ $server_name = substr($server_name, 0, strpos($server_name, ':'));
+ }
+
$data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true;
$data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : $server_name;
$data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'));
@@ -1114,6 +1120,13 @@ class install_install extends module
// HTTP_HOST is having the correct browser url in most cases...
$server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+
+ // HTTP HOST can carry a port number...
+ if (strpos($server_name, ':') !== false)
+ {
+ $server_name = substr($server_name, 0, strpos($server_name, ':'));
+ }
+
$cookie_domain = ($data['server_name'] != '') ? $data['server_name'] : $server_name;
// Try to come up with the best solution for cookie domain...