From 5a13f125a61601f2e47b32a4d94ef9c1e0b9e3db Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Thu, 10 Apr 2008 15:51:09 +0000 Subject: Remove caching. Ideally, this owuld depend on the current load git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8501 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 1baa7abd9a..b6237020f1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3182,7 +3182,7 @@ function obtain_users_online($forum_id = 0) WHERE s.session_time >= ' . ($time - ((int) ($time % 30))) . $reading_sql . ' AND s.session_user_id <> ' . ANONYMOUS; - $result = $db->sql_query($sql, 30); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { -- cgit v1.2.1 From 18e7a58f155446c2efd072dd0934565a33a81e66 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 21 Apr 2008 13:05:49 +0000 Subject: did i ever mention that i hate php's handling of buffers (or i simply do not understand them) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8519 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b6237020f1..67ef220c8d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3652,7 +3652,7 @@ function garbage_collection() */ function exit_handler() { - global $phpbb_hook; + global $phpbb_hook, $config; if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__)) { @@ -3663,7 +3663,7 @@ function exit_handler() } // As a pre-caution... some setups display a blank page if the flush() is not there. - @flush(); + (!$config['gzip_compress']) ? @flush() : @ob_flush(); exit; } -- cgit v1.2.1 From 89474a8e3abc4d453b05656faa7048ad10e3320a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 21 Apr 2008 13:36:32 +0000 Subject: we slowly get to it git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8523 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 67ef220c8d..600506d08f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2941,6 +2941,12 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false) { // flush the content, else we get a white page if output buffering is on + if (strtolower(@ini_get('output_buffering')) !== 'off') + { + @ob_end_flush(); + } + + // Another quick fix for those having gzip compression enabled if ($config['gzip_compress']) { if (@extension_loaded('zlib') && !headers_sent()) -- cgit v1.2.1 From d0cd2152ff810e2cf724ea206b9a0934e08795e2 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 2 Jun 2008 17:15:43 +0000 Subject: give the ACP a login screen git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8581 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 51 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 9 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 600506d08f..f45bfa57b3 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2234,7 +2234,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo */ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { - global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config; + global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path, $config; $err = ''; @@ -2243,6 +2243,16 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { $user->setup(); } + + if (defined('ADMIN_START')) + { + // Set custom template for admin area + $template->set_custom_template($phpbb_admin_path . 'style', 'admin'); + $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); + + // the acp template is never stored in the database + $user->theme['template_storedb'] = false; + } // Print out error if user tries to authenticate as an administrator without having the privileges... if ($admin && !$auth->acl_get('a_')) @@ -2447,20 +2457,43 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ADMIN_AUTH' => $admin, + 'S_ACP_LOGIN' => defined('ADMIN_START'), 'USERNAME' => ($admin) ? $user->data['username'] : '', 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', )); - - page_header($user->lang['LOGIN'], false); - - $template->set_filenames(array( - 'body' => 'login_body.html') - ); + + if (defined('ADMIN_START')) + { + $template->set_filenames(array( + 'body' => 'acp_login.html') + ); + $template->assign_block_vars('t_block1', array( + 'L_TITLE' => $user->lang['LOGIN'], + 'S_SELECTED' => true, + 'U_TITLE' => '', + )); + adm_page_header($user->lang['LOGIN'], false); + } + else + { + $template->set_filenames(array( + 'body' => 'login_body.html') + ); + page_header($user->lang['LOGIN'], false); + } + make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); - - page_footer(); + if (defined('ADMIN_START') && isset($user->data['session_admin']) && $user->data['session_admin']) + { + adm_page_footer(); + } + else + { + page_footer(); + } + } /** -- cgit v1.2.1 From 3116f279a16dd8f927c0cb9e2e605afa5a9dfdd7 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Tue, 3 Jun 2008 16:29:56 +0000 Subject: a little polish git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8585 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f45bfa57b3..f000236027 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2420,7 +2420,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa // If we are not within the admin directory we use the page dir... $redirect = ''; - if (!$admin) + if (!$admin && !defined('ADMIN_START')) { $redirect .= ($user->page['page_dir']) ? $user->page['page_dir'] . '/' : ''; } @@ -2453,7 +2453,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, - 'S_LOGIN_ACTION' => (!$admin) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory + 'S_LOGIN_ACTION' => (!$admin && !defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ADMIN_AUTH' => $admin, @@ -3095,7 +3095,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (!defined('HEADER_INC')) { - if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']) + if (defined('ADMIN_START') || (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])) { adm_page_header($msg_title); } @@ -3119,7 +3119,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) // We do not want the cron script to be called on error messages define('IN_CRON', true); - if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']) + if (defined('ADMIN_START') || (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])) { adm_page_footer(); } -- cgit v1.2.1 From 80f123acb32eaf4c7a0766ddca916f42f4b01bbe Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 4 Jun 2008 11:40:53 +0000 Subject: Too much for a minor; sorry git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8591 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 59 ++++++++++---------------------------------- 1 file changed, 13 insertions(+), 46 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f000236027..600506d08f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2234,7 +2234,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo */ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { - global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path, $config; + global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config; $err = ''; @@ -2243,16 +2243,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { $user->setup(); } - - if (defined('ADMIN_START')) - { - // Set custom template for admin area - $template->set_custom_template($phpbb_admin_path . 'style', 'admin'); - $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); - - // the acp template is never stored in the database - $user->theme['template_storedb'] = false; - } // Print out error if user tries to authenticate as an administrator without having the privileges... if ($admin && !$auth->acl_get('a_')) @@ -2420,7 +2410,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa // If we are not within the admin directory we use the page dir... $redirect = ''; - if (!$admin && !defined('ADMIN_START')) + if (!$admin) { $redirect .= ($user->page['page_dir']) ? $user->page['page_dir'] . '/' : ''; } @@ -2453,47 +2443,24 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, - 'S_LOGIN_ACTION' => (!$admin && !defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory + 'S_LOGIN_ACTION' => (!$admin) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ADMIN_AUTH' => $admin, - 'S_ACP_LOGIN' => defined('ADMIN_START'), 'USERNAME' => ($admin) ? $user->data['username'] : '', 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', )); - - if (defined('ADMIN_START')) - { - $template->set_filenames(array( - 'body' => 'acp_login.html') - ); - $template->assign_block_vars('t_block1', array( - 'L_TITLE' => $user->lang['LOGIN'], - 'S_SELECTED' => true, - 'U_TITLE' => '', - )); - adm_page_header($user->lang['LOGIN'], false); - } - else - { - $template->set_filenames(array( - 'body' => 'login_body.html') - ); - page_header($user->lang['LOGIN'], false); - } - + + page_header($user->lang['LOGIN'], false); + + $template->set_filenames(array( + 'body' => 'login_body.html') + ); make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); - if (defined('ADMIN_START') && isset($user->data['session_admin']) && $user->data['session_admin']) - { - adm_page_footer(); - } - else - { - page_footer(); - } - + + page_footer(); } /** @@ -3095,7 +3062,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (!defined('HEADER_INC')) { - if (defined('ADMIN_START') || (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])) + if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']) { adm_page_header($msg_title); } @@ -3119,7 +3086,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) // We do not want the cron script to be called on error messages define('IN_CRON', true); - if (defined('ADMIN_START') || (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])) + if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']) { adm_page_footer(); } -- cgit v1.2.1 From 374093d6152ff9ff2b232311bfeeafca43a27915 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 4 Jun 2008 13:39:15 +0000 Subject: ok, well, my team is allowed to give me some slappage. :/ I now changed this sooo often and never realised the code portion is absolute rubbish... with ini_get returning something completely different. Now, this should work (at least for PHP 5.2.x) - tested all 16 possible combinations of triggering errors before and after headers sent, with and without gzip compression, with and without output buffering. Now, please work for others too... git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8594 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 600506d08f..ba12fd6e4e 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2941,15 +2941,15 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false) { // flush the content, else we get a white page if output buffering is on - if (strtolower(@ini_get('output_buffering')) !== 'off') + if ((int) @ini_get('output_buffering') === 1 || strtolower(@ini_get('output_buffering')) === 'on') { - @ob_end_flush(); + @ob_flush(); } - // Another quick fix for those having gzip compression enabled + // Another quick fix for those having gzip compression enabled, but do not flush if the coder wants to catch "something". ;) if ($config['gzip_compress']) { - if (@extension_loaded('zlib') && !headers_sent()) + if (@extension_loaded('zlib') && !headers_sent() && !ob_get_level()) { @ob_flush(); } -- cgit v1.2.1 From cd058dd9fe9f86aedb1d864ae78a17cd41003987 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Fri, 6 Jun 2008 11:27:51 +0000 Subject: Some xenophobia git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8611 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ba12fd6e4e..43e89c10fa 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1829,7 +1829,10 @@ function redirect($url, $return = false) } else if (!empty($url_parts['scheme']) && !empty($url_parts['host'])) { - // Full URL + if ($url_parts['host'] !== $user->host) + { + $url = generate_board_url(true); + } } else if ($url[0] == '/') { @@ -2045,11 +2048,14 @@ function meta_refresh($time, $url) global $template; $url = redirect($url, true); + $url = str_replace('&', '&', $url); // For XHTML compatibility we change back & to & $template->assign_vars(array( - 'META' => '') + 'META' => '') ); + + return $url; } //Form validation @@ -2331,7 +2337,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa return; } - meta_refresh(3, $redirect); + $redirect = meta_refresh(3, $redirect); trigger_error($message . '

' . sprintf($l_redirect, '', '')); } -- cgit v1.2.1 From a7dd393ef155e10bf8f0a33c37dba5b2fb36b2c9 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Sun, 8 Jun 2008 15:34:04 +0000 Subject: typo git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8622 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 43e89c10fa..861449d787 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1831,7 +1831,7 @@ function redirect($url, $return = false) { if ($url_parts['host'] !== $user->host) { - $url = generate_board_url(true); + $url = generate_board_url(); } } else if ($url[0] == '/') -- cgit v1.2.1 From 406895a1ad75167829740deac3f08779104838fb Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 9 Jun 2008 17:05:52 +0000 Subject: #27395 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8636 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 861449d787..0b6e4aafed 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1778,7 +1778,7 @@ function generate_board_url($without_script_path = false) if ($server_port && (($config['cookie_secure'] && $server_port <> 443) || (!$config['cookie_secure'] && $server_port <> 80))) { - // HTTP HOST can carry a port number... + // HTTP HOST can carry a port number (we fetch $user->host, but for old versions this may be true) if (strpos($server_name, ':') === false) { $url .= ':' . $server_port; @@ -2054,7 +2054,7 @@ function meta_refresh($time, $url) $template->assign_vars(array( 'META' => '') ); - + return $url; } @@ -3118,16 +3118,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline) function obtain_guest_count($forum_id = 0) { global $db, $config; - + if ($forum_id) { $reading_sql = ' AND s.session_forum_id = ' . (int) $forum_id; - } + } else { $reading_sql = ''; } - $time = (time() - (intval($config['load_online_time']) * 60)); + $time = (time() - (intval($config['load_online_time']) * 60)); // Get number of online guests @@ -3153,7 +3153,7 @@ function obtain_guest_count($forum_id = 0) $result = $db->sql_query($sql, 60); $guests_online = (int) $db->sql_fetchfield('num_guests'); $db->sql_freeresult($result); - + return $guests_online; } @@ -3185,16 +3185,16 @@ function obtain_users_online($forum_id = 0) { $online_users['guests_online'] = obtain_guest_count($forum_id); } - + // a little discrete magic to cache this for 30 seconds - $time = (time() - (intval($config['load_online_time']) * 60)); + $time = (time() - (intval($config['load_online_time']) * 60)); $sql = 'SELECT s.session_user_id, s.session_ip, s.session_viewonline FROM ' . SESSIONS_TABLE . ' s WHERE s.session_time >= ' . ($time - ((int) ($time % 30))) . $reading_sql . ' AND s.session_user_id <> ' . ANONYMOUS; - $result = $db->sql_query($sql); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { @@ -3215,7 +3215,7 @@ function obtain_users_online($forum_id = 0) } $online_users['total_online'] = $online_users['guests_online'] + $online_users['visible_online'] + $online_users['hidden_online']; $db->sql_freeresult($result); - + return $online_users; } -- cgit v1.2.1 From 4444e48d2e020f67ec95474e6ace413768b85df3 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 9 Jun 2008 22:30:27 +0000 Subject: Regular expression for email matching in posts will no longer die on long words git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8641 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 0b6e4aafed..198004957c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2777,7 +2777,7 @@ function get_preg_expression($mode) switch ($mode) { case 'email': - return '(?:[a-z0-9\'\.\-_\+\|]|&)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+'; + return '(?:[a-z0-9\'\.\-_\+\|]++|&)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+'; break; case 'bbcode_htm': -- cgit v1.2.1 From 26f51cf5b386c20ecfbbed539aa6e4e0cabef377 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 10 Jun 2008 12:54:30 +0000 Subject: added two comments to describe the functions use-case git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8643 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 198004957c..c7026ce44c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1801,6 +1801,7 @@ function generate_board_url($without_script_path = false) /** * Redirects the user to another page then exits the script nicely +* This function is intended for urls within the board. It's not meant to redirect to cross-domains. */ function redirect($url, $return = false) { @@ -1829,6 +1830,7 @@ function redirect($url, $return = false) } else if (!empty($url_parts['scheme']) && !empty($url_parts['host'])) { + // Attention: only able to redirect within the same domain (yourdomain.com -> www.yourdomain.com will not work) if ($url_parts['host'] !== $user->host) { $url = generate_board_url(); -- cgit v1.2.1 From 31c97676ade8dc18d79f07e749cc38b1186cf7be Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 12 Jun 2008 14:40:03 +0000 Subject: remove the $Id$ line there and instead add valuable information. Oh, and did not know the phpass project catched our implementation of their code. :) Nice to see. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8651 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c7026ce44c..40eb3fa823 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -255,7 +255,7 @@ function still_on_time($extra_time = 15) /** * -* @version Version 0.1 / $Id$ +* @version Version 0.1 / slightly modified for phpBB 3.0.x (using $H$ as hash type identifier) * * Portable PHP password hashing framework. * -- cgit v1.2.1