From ec78e241b723a0f427d8eb27c9a08578b5a00e1a Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Sat, 8 Apr 2006 14:46:32 +0000 Subject: [PATCH] Set the cookie domain by default on installs which don't have a server_name set git-svn-id: file:///svn/phpbb/trunk@5772 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_install.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 640f7b99fa..fe058b5e56 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -822,6 +822,8 @@ class install_install extends module $$var = request_var($var, ''); } + $cookie_domain = ($server_name != '') ? $server_name : (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'); + // If we get here and the extension isn't loaded it should be safe to just go ahead and load it if (!extension_loaded($this->available_dbms[$dbms]['MODULE'])) { @@ -931,7 +933,7 @@ class install_install extends module WHERE config_name = 'board_contact'", 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($server_name) . "' + SET config_value = '" . $db->sql_escape($cookie_domain) . "' WHERE config_name = 'cookie_domain'", 'UPDATE ' . $table_prefix . "config @@ -1092,7 +1094,7 @@ class install_install extends module 'TITLE' => $lang['INSTALL_CONGRATS'], 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], '', ''), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], - 'U_ACTION' => $phpbb_root_path . 'adm/index. ' . $phpEx . $SID, + 'U_ACTION' => $phpbb_root_path . 'adm/index.' . $phpEx . $SID, )); }