diff options
author | Graham Eames <grahamje@users.sourceforge.net> | 2006-04-08 14:46:32 +0000 |
---|---|---|
committer | Graham Eames <grahamje@users.sourceforge.net> | 2006-04-08 14:46:32 +0000 |
commit | ec78e241b723a0f427d8eb27c9a08578b5a00e1a (patch) | |
tree | c909c739628d2fb207d9e931cb16beff590c259b /phpBB/install | |
parent | c5b203b485c3ea805d54bb05629db1888f37438e (diff) | |
download | forums-ec78e241b723a0f427d8eb27c9a08578b5a00e1a.tar forums-ec78e241b723a0f427d8eb27c9a08578b5a00e1a.tar.gz forums-ec78e241b723a0f427d8eb27c9a08578b5a00e1a.tar.bz2 forums-ec78e241b723a0f427d8eb27c9a08578b5a00e1a.tar.xz forums-ec78e241b723a0f427d8eb27c9a08578b5a00e1a.zip |
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
Diffstat (limited to 'phpBB/install')
-rwxr-xr-x | phpBB/install/install_install.php | 6 |
1 files 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'], '<a href="../docs/README.html" target="_blank">', '</a>'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], - 'U_ACTION' => $phpbb_root_path . 'adm/index. ' . $phpEx . $SID, + 'U_ACTION' => $phpbb_root_path . 'adm/index.' . $phpEx . $SID, )); } |