diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-30 15:18:35 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-30 15:18:35 +0000 |
commit | ad4d7c036eb144559bbce553afa4952587c28e56 (patch) | |
tree | 4a24c7861d50bc475f27220b3eb317bf09e836dd /phpBB/includes/functions.php | |
parent | e4c3a743cae78196ef0e2bfd0dcd27e1ea4bb1ba (diff) | |
download | forums-ad4d7c036eb144559bbce553afa4952587c28e56.tar forums-ad4d7c036eb144559bbce553afa4952587c28e56.tar.gz forums-ad4d7c036eb144559bbce553afa4952587c28e56.tar.bz2 forums-ad4d7c036eb144559bbce553afa4952587c28e56.tar.xz forums-ad4d7c036eb144559bbce553afa4952587c28e56.zip |
merge r8956, r8957 and r8960
git-svn-id: file:///svn/phpbb/trunk@8961 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 734a9716c8..ca8e71906a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3178,6 +3178,9 @@ function msg_handler($errno, $msg_text, $errfile, $errline) echo '</html>'; exit_handler(); + + // On a fatal error (and E_USER_ERROR *is* fatal) we never want other scripts to continue and force an exit here. + exit; break; case E_USER_WARNING: @@ -3445,7 +3448,7 @@ function page_header($page_title = '', $display_online_list = true) $s_privmsg_new = false; // Obtain number of new private messages if user is logged in - if (isset($user->data['is_registered']) && $user->data['is_registered']) + if (!empty($user->data['is_registered'])) { if ($user->data['user_new_privmsg']) { @@ -3542,8 +3545,8 @@ function page_header($page_title = '', $display_online_list = true) 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false, 'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false, 'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false, - 'S_REGISTERED_USER' => $user->data['is_registered'], - 'S_IS_BOT' => $user->data['is_bot'], + 'S_REGISTERED_USER' => (!empty($user->data['is_registered'])) ? true : false, + 'S_IS_BOT' => (!empty($user->data['is_bot'])) ? true : false, 'S_IN_SEARCH' => false, 'S_VIEWTOPIC' => false, 'S_VIEWFORUM' => false, @@ -3558,7 +3561,7 @@ function page_header($page_title = '', $display_online_list = true) 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''), 'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0, 'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1), - 'S_DISPLAY_PM' => ($config['allow_privmsg'] && $user->data['is_registered'] && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false, + 'S_DISPLAY_PM' => ($config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false, 'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0, 'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0, 'S_REGISTER_ENABLED' => ($config['require_activation'] != USER_ACTIVATION_DISABLE) ? true : false, @@ -3634,8 +3637,8 @@ function page_footer($run_cron = true) 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', - 'U_ACP' => ($auth->acl_get('a_') && $user->data['is_registered']) ? append_sid(CONFIG_ADM_FOLDER . '/index', false, true, $user->session_id) : '') - ); + 'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid(CONFIG_ADM_FOLDER . '/index', false, true, $user->session_id) : '', + )); // Call cron-type script if (!defined('IN_CRON') && $run_cron && !$config['board_disable']) |