mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
merge r8956, r8957 and r8960
git-svn-id: file:///svn/phpbb/trunk@8961 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e4c3a743ca
commit
ad4d7c036e
5 changed files with 17 additions and 13 deletions
|
@ -3178,6 +3178,9 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
echo '</html>';
|
echo '</html>';
|
||||||
|
|
||||||
exit_handler();
|
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;
|
break;
|
||||||
|
|
||||||
case E_USER_WARNING:
|
case E_USER_WARNING:
|
||||||
|
@ -3445,7 +3448,7 @@ function page_header($page_title = '', $display_online_list = true)
|
||||||
$s_privmsg_new = false;
|
$s_privmsg_new = false;
|
||||||
|
|
||||||
// Obtain number of new private messages if user is logged in
|
// 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'])
|
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_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
||||||
'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false,
|
'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false,
|
||||||
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
|
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
|
||||||
'S_REGISTERED_USER' => $user->data['is_registered'],
|
'S_REGISTERED_USER' => (!empty($user->data['is_registered'])) ? true : false,
|
||||||
'S_IS_BOT' => $user->data['is_bot'],
|
'S_IS_BOT' => (!empty($user->data['is_bot'])) ? true : false,
|
||||||
'S_IN_SEARCH' => false,
|
'S_IN_SEARCH' => false,
|
||||||
'S_VIEWTOPIC' => false,
|
'S_VIEWTOPIC' => false,
|
||||||
'S_VIEWFORUM' => 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_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_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_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_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
|
||||||
'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0,
|
'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0,
|
||||||
'S_REGISTER_ENABLED' => ($config['require_activation'] != USER_ACTIVATION_DISABLE) ? true : false,
|
'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 : '',
|
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
|
||||||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
'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
|
// Call cron-type script
|
||||||
if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
|
if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
|
||||||
|
|
|
@ -238,7 +238,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po
|
||||||
function get_context($text, $words, $length = 400)
|
function get_context($text, $words, $length = 400)
|
||||||
{
|
{
|
||||||
// first replace all whitespaces with single spaces
|
// first replace all whitespaces with single spaces
|
||||||
$text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), $text);
|
$text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '));
|
||||||
|
|
||||||
$word_indizes = array();
|
$word_indizes = array();
|
||||||
if (sizeof($words))
|
if (sizeof($words))
|
||||||
|
|
|
@ -166,7 +166,7 @@ if ($quickmod)
|
||||||
case 'delete_post':
|
case 'delete_post':
|
||||||
case 'delete_topic':
|
case 'delete_topic':
|
||||||
$module->load('mcp', 'main', 'quickmod');
|
$module->load('mcp', 'main', 'quickmod');
|
||||||
exit;
|
return;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'topic_logs':
|
case 'topic_logs':
|
||||||
|
@ -183,7 +183,8 @@ if ($quickmod)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
trigger_error("$action not allowed as quickmod");
|
trigger_error("$action not allowed as quickmod", E_USER_ERROR);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -120,7 +120,7 @@ switch ($mode)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
upload_popup();
|
upload_popup();
|
||||||
exit;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ if (!$post_data)
|
||||||
if ($mode == 'popup')
|
if ($mode == 'popup')
|
||||||
{
|
{
|
||||||
upload_popup($post_data['forum_style']);
|
upload_popup($post_data['forum_style']);
|
||||||
exit;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
|
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
|
||||||
|
@ -282,7 +282,7 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
|
||||||
if ($mode == 'delete')
|
if ($mode == 'delete')
|
||||||
{
|
{
|
||||||
handle_post_delete($forum_id, $topic_id, $post_id, $post_data);
|
handle_post_delete($forum_id, $topic_id, $post_id, $post_data);
|
||||||
exit;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle bump mode...
|
// Handle bump mode...
|
||||||
|
|
|
@ -113,7 +113,7 @@ if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
|
||||||
|
|
||||||
// We redirect to the url. The third parameter indicates that external redirects are allowed.
|
// We redirect to the url. The third parameter indicates that external redirects are allowed.
|
||||||
redirect($forum_data['forum_link'], false, true);
|
redirect($forum_data['forum_link'], false, true);
|
||||||
exit;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build navigation links
|
// Build navigation links
|
||||||
|
|
Loading…
Add table
Reference in a new issue