|
From: FlorinCB <ory...@us...> - 2008-07-05 22:18:53
|
Update of /cvsroot/mxbb/core/includes/shared/phpbb3/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12439 Modified Files: functions.php Log Message: fix Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** functions.php 20 Jun 2008 15:55:05 -0000 1.19 --- functions.php 5 Jul 2008 22:18:50 -0000 1.20 *************** *** 531,535 **** function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false) { ! global $board_config, $auth, $template, $user, $db; if (!$board_config['load_jumpbox']) --- 531,535 ---- function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false) { ! global $board_config, $phpbb_auth, $template, $user, $db; if (!$board_config['load_jumpbox']) *************** *** 574,578 **** } ! if (!$auth->acl_get('f_list', $row['forum_id'])) { // if the user does not have permissions to list this forum skip --- 574,578 ---- } ! if (!$phpbb_auth->acl_get('f_list', $row['forum_id'])) { // if the user does not have permissions to list this forum skip *************** *** 580,584 **** } ! if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id'])) { continue; --- 580,584 ---- } ! if ($acl_list && !$phpbb_auth->acl_gets($acl_list, $row['forum_id'])) { continue; *************** *** 2042,2052 **** * Examples: * <code> ! * append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1&f=2"); ! * append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2'); ! * append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false); ! * append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2)); * </code> */ ! function append_sid($url, $params = false, $is_amp = true, $session_id = false) { global $_SID, $_EXTRA_URL; --- 2042,2052 ---- * Examples: * <code> ! * mx3_append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1&f=2"); ! * mx3_append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2'); ! * mx3_append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false); ! * mx3_append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2)); * </code> */ ! function mx3_append_sid($url, $params = false, $is_amp = true, $session_id = false) { global $_SID, $_EXTRA_URL; *************** *** 2312,2320 **** if ($url === "index.$phpEx") { ! return append_sid("index.$phpEx"); } else if ($url === "{$phpbb_root_path}index.$phpEx") { ! return append_sid("{$phpbb_root_path}index.$phpEx"); } --- 2312,2320 ---- if ($url === "index.$phpEx") { ! return mx3_append_sid("index.$phpEx"); } else if ($url === "{$phpbb_root_path}index.$phpEx") { ! return mx3_append_sid("{$phpbb_root_path}index.$phpEx"); } *************** *** 2345,2349 **** // Append SID $redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? "?{$user->page['query_string']}" : ''); ! $redirect = append_sid($redirect, false, false); // Add delimiter if not there... --- 2345,2349 ---- // Append SID $redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? "?{$user->page['query_string']}" : ''); ! $redirect = mx3_append_sid($redirect, false, false); // Add delimiter if not there... *************** *** 2530,2534 **** function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { ! global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $board_config; $err = ''; --- 2530,2534 ---- function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { ! global $db, $user, $template, $phpbb_auth, $phpEx, $phpbb_root_path, $board_config; $err = ''; *************** *** 2541,2545 **** // Print out error if user tries to authenticate as an administrator without having the privileges... ! if ($admin && !$auth->acl_get('a_')) { // Not authd --- 2541,2545 ---- // Print out error if user tries to authenticate as an administrator without having the privileges... ! if ($admin && !$phpbb_auth->acl_get('a_')) { // Not authd *************** *** 2576,2580 **** // If authentication is successful we redirect user to previous page ! $result = $auth->login($username, $password, $autologin, $viewonline, $admin); // If admin authentication and login, we will log if it was a success or not... --- 2576,2580 ---- // If authentication is successful we redirect user to previous page ! $result = $phpbb_auth->login($username, $password, $autologin, $viewonline, $admin); // If admin authentication and login, we will log if it was a success or not... *************** *** 2654,2658 **** 'S_CONFIRM_CODE' => true, 'CONFIRM_ID' => $confirm_id, ! 'CONFIRM_IMAGE' => '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_LOGIN) . '" alt="" title="" />', 'L_LOGIN_CONFIRM_EXPLAIN' => sprintf($user->lang['LOGIN_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($board_config['board_contact']) . '">', '</a>'), )); --- 2654,2658 ---- 'S_CONFIRM_CODE' => true, 'CONFIRM_ID' => $confirm_id, ! 'CONFIRM_IMAGE' => '<img src="' . mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_LOGIN) . '" alt="" title="" />', 'L_LOGIN_CONFIRM_EXPLAIN' => sprintf($user->lang['LOGIN_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($board_config['board_contact']) . '">', '</a>'), )); *************** *** 2665,2669 **** $err = sprintf( $user->lang[$result['error_msg']], ! ($board_config['email_enable']) ? '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '', ($board_config['email_enable']) ? '</a>' : '', ($board_config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($board_config['board_contact']) . '">' : '', --- 2665,2669 ---- $err = sprintf( $user->lang[$result['error_msg']], ! ($board_config['email_enable']) ? '<a href="' . mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '', ($board_config['email_enable']) ? '</a>' : '', ($board_config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($board_config['board_contact']) . '">' : '', *************** *** 2706,2716 **** 'LOGIN_EXPLAIN' => $l_explain, ! 'U_SEND_PASSWORD' => ($board_config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '', ! 'U_RESEND_ACTIVATION' => ($board_config['require_activation'] != USER_ACTIVATION_NONE && $board_config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '', ! 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), ! '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_HIDDEN_FIELDS' => $s_hidden_fields, --- 2706,2716 ---- 'LOGIN_EXPLAIN' => $l_explain, ! 'U_SEND_PASSWORD' => ($board_config['email_enable']) ? mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '', ! 'U_RESEND_ACTIVATION' => ($board_config['require_activation'] != USER_ACTIVATION_NONE && $board_config['email_enable']) ? mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '', ! 'U_TERMS_USE' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), ! 'U_PRIVACY' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, ! 'S_LOGIN_ACTION' => (!$admin) ? mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : mx3_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, *************** *** 2812,2819 **** function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster) { ! global $board_config, $auth, $user; // Check permission and make sure the last post was not already bumped ! if (!$auth->acl_get('f_bump', $forum_id) || $topic_bumped) { return false; --- 2812,2819 ---- function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster) { ! global $board_config, $phpbb_auth, $user; // Check permission and make sure the last post was not already bumped ! if (!$phpbb_auth->acl_get('f_bump', $forum_id) || $topic_bumped) { return false; *************** *** 3490,3494 **** } ! $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); switch ($display_cat) --- 3490,3494 ---- } ! $download_link = mx3_append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); switch ($display_cat) *************** *** 3497,3501 **** case ATTACHMENT_CATEGORY_IMAGE: $l_downloaded_viewed = 'VIEWED_COUNT'; ! $inline_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); $download_link .= '&mode=view'; --- 3497,3501 ---- case ATTACHMENT_CATEGORY_IMAGE: $l_downloaded_viewed = 'VIEWED_COUNT'; ! $inline_link = mx3_append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); $download_link .= '&mode=view'; *************** *** 3511,3515 **** case ATTACHMENT_CATEGORY_THUMB: $l_downloaded_viewed = 'VIEWED_COUNT'; ! $thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1'); $download_link .= '&mode=view'; --- 3511,3515 ---- case ATTACHMENT_CATEGORY_THUMB: $l_downloaded_viewed = 'VIEWED_COUNT'; ! $thumbnail_link = mx3_append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1'); $download_link .= '&mode=view'; *************** *** 4000,4004 **** function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) { ! global $phpbb_root_path, $phpEx, $user, $auth; $profile_url = ''; --- 4000,4004 ---- function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) { ! global $phpbb_root_path, $phpEx, $user, $phpbb_auth; $profile_url = ''; *************** *** 4019,4023 **** // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly). // For all others the link leads to a login page or the profile. ! if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) { $profile_url = ''; --- 4019,4023 ---- // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly). // For all others the link leads to a login page or the profile. ! if ($user->data['user_id'] != ANONYMOUS && !$phpbb_auth->acl_get('u_viewprofile')) { $profile_url = ''; *************** *** 4025,4029 **** else { ! $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; } --- 4025,4029 ---- else { ! $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; } *************** *** 4133,4137 **** function msg_handler($errno, $msg_text, $errfile, $errline) { ! global $mx_cache, $db, $auth, $template, $board_config, $user; global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text; --- 4133,4137 ---- function msg_handler($errno, $msg_text, $errfile, $errline) { ! global $mx_cache, $db, $phpbb_auth, $template, $board_config, $user; global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text; *************** *** 4252,4256 **** // We re-init the auth array to get correct results on login/logout ! $auth->acl($user->data); if (empty($user->lang)) --- 4252,4256 ---- // We re-init the auth array to get correct results on login/logout ! $phpbb_auth->acl($user->data); if (empty($user->lang)) *************** *** 4311,4315 **** function page_header($page_title = '', $display_online_list = true) { ! global $db, $board_config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; if (defined('HEADER_INC')) --- 4311,4315 ---- function page_header($page_title = '', $display_online_list = true) { ! global $db, $board_config, $template, $SID, $_SID, $user, $phpbb_auth, $phpEx, $phpbb_root_path; if (defined('HEADER_INC')) *************** *** 4332,4341 **** if ($user->data['user_id'] != ANONYMOUS) { ! $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id); $l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']); } else { ! $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'); $l_login_logout = $user->lang['LOGIN']; } --- 4332,4341 ---- if ($user->data['user_id'] != ANONYMOUS) { ! $u_login_logout = mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id); $l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']); } else { ! $u_login_logout = mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'); $l_login_logout = $user->lang['LOGIN']; } *************** *** 4424,4432 **** } ! if (($row['session_viewonline']) || $auth->acl_get('u_viewonline')) { if ($row['user_type'] <> USER_IGNORE) { ! $user_online_link = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) . '"' . $user_colour . '>' . $user_online_link . '</a>'; } else --- 4424,4432 ---- } ! if (($row['session_viewonline']) || $phpbb_auth->acl_get('u_viewonline')) { if ($row['user_type'] <> USER_IGNORE) { ! $user_online_link = '<a href="' . mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) . '"' . $user_colour . '>' . $user_online_link . '</a>'; } else *************** *** 4589,4614 **** 'L_ONLINE_EXPLAIN' => $l_online_time, ! 'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), ! 'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), ! 'UA_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false), ! 'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup'), ! 'UA_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup', false), ! 'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"), ! 'U_MEMBERSLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"), ! 'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '', 'U_LOGIN_LOGOUT' => $u_login_logout, ! 'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"), ! 'U_SEARCH' => append_sid("{$phpbb_root_path}search.$phpEx"), ! 'U_REGISTER' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'), ! 'U_PROFILE' => append_sid("{$phpbb_root_path}ucp.$phpEx"), ! 'U_MODCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", false, true, $user->session_id), ! 'U_FAQ' => append_sid("{$phpbb_root_path}faq.$phpEx"), ! 'U_SEARCH_SELF' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch'), ! 'U_SEARCH_NEW' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=newposts'), ! 'U_SEARCH_UNANSWERED' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unanswered'), ! 'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'), ! 'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'), ! 'U_TEAM' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'), ! 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false, --- 4589,4614 ---- 'L_ONLINE_EXPLAIN' => $l_online_time, ! 'U_PRIVATEMSGS' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), ! 'U_RETURN_INBOX' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), ! 'UA_RETURN_INBOX' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false), ! 'U_POPUP_PM' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup'), ! 'UA_POPUP_PM' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup', false), ! 'U_MEMBERLIST' => mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx"), ! 'U_MEMBERSLIST' => mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx"), ! 'U_VIEWONLINE' => ($phpbb_auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? mx3_append_sid("{$phpbb_root_path}viewonline.$phpEx") : '', 'U_LOGIN_LOGOUT' => $u_login_logout, ! 'U_INDEX' => mx3_append_sid("{$phpbb_root_path}index.$phpEx"), ! 'U_SEARCH' => mx3_append_sid("{$phpbb_root_path}search.$phpEx"), ! 'U_REGISTER' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'), ! 'U_PROFILE' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx"), ! 'U_MODCP' => mx3_append_sid("{$phpbb_root_path}mcp.$phpEx", false, true, $user->session_id), ! 'U_FAQ' => mx3_append_sid("{$phpbb_root_path}faq.$phpEx"), ! 'U_SEARCH_SELF' => mx3_append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch'), ! 'U_SEARCH_NEW' => mx3_append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=newposts'), ! 'U_SEARCH_UNANSWERED' => mx3_append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unanswered'), ! 'U_SEARCH_ACTIVE_TOPICS'=> mx3_append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'), ! 'U_DELETE_COOKIES' => mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'), ! 'U_TEAM' => mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'), ! 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $phpbb_auth->acl_get('a_switchperm')) ? mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false, *************** *** 4627,4633 **** 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $board_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' => (!$board_config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1), ! 'S_DISPLAY_PM' => ($board_config['allow_privmsg'] && $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, --- 4627,4633 ---- 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $board_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' => (!$board_config['load_search']) ? 0 : (isset($phpbb_auth) ? ($phpbb_auth->acl_get('u_search') && $phpbb_auth->acl_getf_global('f_search')) : 1), ! 'S_DISPLAY_PM' => ($board_config['allow_privmsg'] && $user->data['is_registered'] && ($phpbb_auth->acl_get('u_readpm') || $phpbb_auth->acl_get('u_sendpm'))) ? true : false, ! 'S_DISPLAY_MEMBERLIST' => (isset($phpbb_auth)) ? $phpbb_auth->acl_get('u_viewprofile') : 0, 'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0, *************** *** 4665,4669 **** function page_footer($run_cron = true) { ! global $db, $board_config, $template, $mx_user, $auth, $mx_cache, $starttime, $phpbb_root_path, $phpEx; // Output page creation time --- 4665,4669 ---- function page_footer($run_cron = true) { ! global $db, $board_config, $template, $mx_user, $phpbb_auth, $mx_cache, $starttime, $phpbb_root_path, $phpEx; // Output page creation time *************** *** 4673,4677 **** $totaltime = $mtime[0] + $mtime[1] - $starttime; ! if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report')) { $db->sql_report('display'); --- 4673,4677 ---- $totaltime = $mtime[0] + $mtime[1] - $starttime; ! if (!empty($_REQUEST['explain']) && $phpbb_auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report')) { $db->sql_report('display'); *************** *** 4680,4684 **** $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($board_config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); ! if ($auth->acl_get('a_') && defined('DEBUG_EXTRA')) { if (function_exists('memory_get_usage')) --- 4680,4684 ---- $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($board_config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); ! if ($phpbb_auth->acl_get('a_') && defined('DEBUG_EXTRA')) { if (function_exists('memory_get_usage')) |