diff options
Diffstat (limited to 'phpBB/modules/mcp')
-rw-r--r-- | phpBB/modules/mcp/mcp_ban.php | 2 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_forum.php | 42 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_logs.php | 4 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_main.php | 4 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_notes.php | 4 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_post.php | 30 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_queue.php | 12 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_reports.php | 14 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_topic.php | 28 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_warn.php | 2 |
10 files changed, 71 insertions, 71 deletions
diff --git a/phpBB/modules/mcp/mcp_ban.php b/phpBB/modules/mcp/mcp_ban.php index a5680dcbff..b9f6c3e634 100644 --- a/phpBB/modules/mcp/mcp_ban.php +++ b/phpBB/modules/mcp/mcp_ban.php @@ -148,7 +148,7 @@ class mcp_ban 'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp_ban&field=ban'), )); - if ($mode === 'email' && !$auth->acl_get('a_user')) + if ($mode === 'email' && !phpbb::$acl->acl_get('a_user')) { return; } diff --git a/phpBB/modules/mcp/mcp_forum.php b/phpBB/modules/mcp/mcp_forum.php index d1048a8803..d7185bcca6 100644 --- a/phpBB/modules/mcp/mcp_forum.php +++ b/phpBB/modules/mcp/mcp_forum.php @@ -110,21 +110,21 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'LAST_POST_IMG' => phpbb::$user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'NEWEST_POST_IMG' => phpbb::$user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), - 'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id), - 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id), - 'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id), - 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id), - 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id), - 'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id), - 'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id), - 'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id), + 'S_CAN_REPORT' => phpbb::$acl->acl_get('m_report', $forum_id), + 'S_CAN_DELETE' => phpbb::$acl->acl_get('m_delete', $forum_id), + 'S_CAN_MERGE' => phpbb::$acl->acl_get('m_merge', $forum_id), + 'S_CAN_MOVE' => phpbb::$acl->acl_get('m_move', $forum_id), + 'S_CAN_FORK' => phpbb::$acl->acl_get('m_', $forum_id), + 'S_CAN_LOCK' => phpbb::$acl->acl_get('m_lock', $forum_id), + 'S_CAN_SYNC' => phpbb::$acl->acl_get('m_', $forum_id), + 'S_CAN_APPROVE' => phpbb::$acl->acl_get('m_approve', $forum_id), 'S_MERGE_SELECT' => ($merge_select) ? true : false, - 'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', $forum_id), - 'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id), - 'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id), + 'S_CAN_MAKE_NORMAL' => phpbb::$acl->acl_gets('f_sticky', 'f_announce', $forum_id), + 'S_CAN_MAKE_STICKY' => phpbb::$acl->acl_get('f_sticky', $forum_id), + 'S_CAN_MAKE_ANNOUNCE' => phpbb::$acl->acl_get('f_announce', $forum_id), 'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $forum_id), - 'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid('mcp', 'i=logs&mode=forum_logs&f=' . $forum_id) : '', + 'U_VIEW_FORUM_LOGS' => (phpbb::$acl->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid('mcp', 'i=logs&mode=forum_logs&f=' . $forum_id) : '', 'S_MCP_ACTION' => $url . "&i=$id&forum_action=$action&mode=$mode&start=$start" . (($merge_select) ? $selected_ids : ''), @@ -151,7 +151,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $sql = "SELECT t.topic_id FROM " . TOPICS_TABLE . " t WHERE t.forum_id IN($forum_id, 0) - " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . " + " . ((phpbb::$acl->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . " $limit_time_sql ORDER BY t.topic_type DESC, $sort_order_sql"; $result = $db->sql_query_limit($sql, $topics_per_page, $start); @@ -200,7 +200,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $row = &$topic_rows[$topic_id]; - $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; + $replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; if ($row['topic_status'] == ITEM_MOVED) { @@ -217,12 +217,12 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $topic_title = censor_text($row['topic_title']); - $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false; - $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false; + $topic_unapproved = (!$row['topic_approved'] && phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? true : false; + $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? true : false; $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&t=' . $row['topic_id'] : ''; $topic_row = array( - 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '', + 'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '', 'TOPIC_FOLDER_IMG' => phpbb::$user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => phpbb::$user->img($folder_img, $folder_alt, 'src'), 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', @@ -242,13 +242,13 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'TOPIC_TYPE' => $topic_type, 'TOPIC_TITLE' => $topic_title, - 'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'], + 'REPLIES' => (phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'], 'LAST_POST_TIME' => phpbb::$user->format_date($row['topic_last_post_time']), 'FIRST_POST_TIME' => phpbb::$user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], 'LAST_VIEW_TIME' => phpbb::$user->format_date($row['topic_last_view_time']), - 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false, + 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && phpbb::$acl->acl_get('m_report', $row['forum_id'])) ? true : false, 'S_TOPIC_UNAPPROVED' => $topic_unapproved, 'S_POSTS_UNAPPROVED' => $posts_unapproved, 'S_UNREAD_TOPIC' => $unread_topic, @@ -258,7 +258,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) { $topic_row = array_merge($topic_row, array( 'U_VIEW_TOPIC' => append_sid('viewtopic', "t={$row['topic_moved_id']}"), - 'U_DELETE_TOPIC' => ($auth->acl_get('m_delete', $forum_id)) ? append_sid('mcp', "i=$id&f=$forum_id&topic_id_list[]={$row['topic_id']}&mode=forum_view&action=delete_topic") : '', + 'U_DELETE_TOPIC' => (phpbb::$acl->acl_get('m_delete', $forum_id)) ? append_sid('mcp', "i=$id&f=$forum_id&topic_id_list[]={$row['topic_id']}&mode=forum_view&action=delete_topic") : '', 'S_MOVED_TOPIC' => true, 'TOPIC_ID' => $row['topic_moved_id'], )); @@ -279,7 +279,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'S_SELECT_TOPIC' => ($merge_select && !in_array($row['topic_id'], $source_topic_ids)) ? true : false, 'U_SELECT_TOPIC' => $u_select_topic, 'U_MCP_QUEUE' => $u_mcp_queue, - 'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '', + 'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '', 'TOPIC_ID' => $row['topic_id'], 'S_TOPIC_CHECKED' => ($topic_id_list && in_array($row['topic_id'], $topic_id_list)) ? true : false, )); diff --git a/phpBB/modules/mcp/mcp_logs.php b/phpBB/modules/mcp/mcp_logs.php index 8c162d4d31..026609e09f 100644 --- a/phpBB/modules/mcp/mcp_logs.php +++ b/phpBB/modules/mcp/mcp_logs.php @@ -101,7 +101,7 @@ class mcp_logs } // Delete entries if requested and able - if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) + if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs')) { if (confirm_box(true)) { @@ -174,7 +174,7 @@ class mcp_logs 'L_TITLE' => phpbb::$user->lang['MCP_LOGS'], 'U_POST_ACTION' => $this->u_action, - 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, + 'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, diff --git a/phpBB/modules/mcp/mcp_main.php b/phpBB/modules/mcp/mcp_main.php index 3fa38c7d1f..73b4e880ea 100644 --- a/phpBB/modules/mcp/mcp_main.php +++ b/phpBB/modules/mcp/mcp_main.php @@ -558,7 +558,7 @@ function mcp_move_topic($topic_ids) { $additional_msg = phpbb::$user->lang['FORUM_NOT_POSTABLE']; } - else if (!$auth->acl_get('f_post', $to_forum_id)) + else if (!phpbb::$acl->acl_get('f_post', $to_forum_id)) { $additional_msg = phpbb::$user->lang['USER_CANNOT_POST']; } @@ -956,7 +956,7 @@ function mcp_fork_topic($topic_ids) { $additional_msg = phpbb::$user->lang['FORUM_NOT_POSTABLE']; } - else if (!$auth->acl_get('f_post', $to_forum_id)) + else if (!phpbb::$acl->acl_get('f_post', $to_forum_id)) { $additional_msg = phpbb::$user->lang['USER_CANNOT_POST']; } diff --git a/phpBB/modules/mcp/mcp_notes.php b/phpBB/modules/mcp/mcp_notes.php index 02267aa817..ae5c975ccf 100644 --- a/phpBB/modules/mcp/mcp_notes.php +++ b/phpBB/modules/mcp/mcp_notes.php @@ -109,7 +109,7 @@ class mcp_notes $usernote = utf8_normalize_nfc(request_var('usernote', '', true)); // Handle any actions - if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) + if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs')) { $where_sql = ''; if ($deletemark && $marked) @@ -209,7 +209,7 @@ class mcp_notes $template->assign_vars(array( 'U_POST_ACTION' => $this->u_action, - 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, + 'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, diff --git a/phpBB/modules/mcp/mcp_post.php b/phpBB/modules/mcp/mcp_post.php index 33a2336662..0ba2becec1 100644 --- a/phpBB/modules/mcp/mcp_post.php +++ b/phpBB/modules/mcp/mcp_post.php @@ -44,7 +44,7 @@ function mcp_post_details($id, $mode, $action) { case 'whois': - if ($auth->acl_get('m_info', $post_info['forum_id'])) + if (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) { $ip = request_var('ip', ''); include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); @@ -88,7 +88,7 @@ function mcp_post_details($id, $mode, $action) trigger_error('NO_USER'); } - if ($auth->acl_get('m_chgposter', $post_info['forum_id'])) + if (phpbb::$acl->acl_get('m_chgposter', $post_info['forum_id'])) { if (check_form_key('mcp_post_details')) { @@ -136,7 +136,7 @@ function mcp_post_details($id, $mode, $action) $message = bbcode_nl2br($message); $message = smiley_text($message); - if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) + if ($post_info['post_attachment'] && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $post_info['forum_id'])) { $extensions = phpbb_cache::obtain_extensions_forum($post_info['forum_id']); @@ -178,23 +178,23 @@ function mcp_post_details($id, $mode, $action) 'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters 'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&p=$post_id&f={$post_info['forum_id']}"), - 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), - 'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']), - 'S_CAN_LOCK_POST' => $auth->acl_get('m_lock', $post_info['forum_id']), - 'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']), + 'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']), + 'S_CAN_CHGPOSTER' => phpbb::$acl->acl_get('m_chgposter', $post_info['forum_id']), + 'S_CAN_LOCK_POST' => phpbb::$acl->acl_get('m_lock', $post_info['forum_id']), + 'S_CAN_DELETE_POST' => phpbb::$acl->acl_get('m_delete', $post_info['forum_id']), 'S_POST_REPORTED' => ($post_info['post_reported']) ? true : false, 'S_POST_UNAPPROVED' => (!$post_info['post_approved']) ? true : false, 'S_POST_LOCKED' => ($post_info['post_edit_locked']) ? true : false, 'S_USER_NOTES' => true, - 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, + 'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false, - 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', + 'U_EDIT' => (phpbb::$acl->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', 'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true'), 'U_MCP_APPROVE' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_USER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $post_info['user_id']), - 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', + 'U_MCP_WARN_USER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), 'U_VIEW_TOPIC' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), @@ -216,11 +216,11 @@ function mcp_post_details($id, $mode, $action) 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => phpbb::$user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], - 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', + 'POST_IPADDR' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', 'POST_ID' => $post_info['post_id'], - 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '', - 'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '', + 'U_LOOKUP_IP' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '', + 'U_WHOIS' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '', )); // Get User Notes @@ -244,7 +244,7 @@ function mcp_post_details($id, $mode, $action) } // Get Reports - if ($auth->acl_get('m_', $post_info['forum_id'])) + if (phpbb::$acl->acl_get('m_', $post_info['forum_id'])) { $sql = 'SELECT r.*, re.*, u.user_id, u.username FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u, ' . REPORTS_REASONS_TABLE . " re @@ -284,7 +284,7 @@ function mcp_post_details($id, $mode, $action) } // Get IP - if ($auth->acl_get('m_info', $post_info['forum_id'])) + if (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) { $rdns_ip_num = request_var('rdns', ''); diff --git a/phpBB/modules/mcp/mcp_queue.php b/phpBB/modules/mcp/mcp_queue.php index 6e4e0144d0..27db877836 100644 --- a/phpBB/modules/mcp/mcp_queue.php +++ b/phpBB/modules/mcp/mcp_queue.php @@ -137,7 +137,7 @@ class mcp_queue $message = bbcode_nl2br($message); $message = smiley_text($message); - if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) + if ($post_info['post_attachment'] && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $post_info['forum_id'])) { $extensions = phpbb_cache::obtain_extensions_forum($post_info['forum_id']); @@ -180,17 +180,17 @@ class mcp_queue $template->assign_vars(array( 'S_MCP_QUEUE' => true, 'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&p=$post_id&f=$forum_id"), - 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), + 'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], 'S_POST_LOCKED' => $post_info['post_edit_locked'], 'S_USER_NOTES' => true, - 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', + 'U_EDIT' => (phpbb::$acl->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', 'U_MCP_APPROVE' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_USER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $post_info['user_id']), - 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', + 'U_MCP_WARN_USER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => $post_url, 'U_VIEW_TOPIC' => $topic_url, @@ -212,10 +212,10 @@ class mcp_queue 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => phpbb::$user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], - 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', + 'POST_IPADDR' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', 'POST_ID' => $post_info['post_id'], - 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '', + 'U_LOOKUP_IP' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '', )); break; diff --git a/phpBB/modules/mcp/mcp_reports.php b/phpBB/modules/mcp/mcp_reports.php index f1aba235eb..5deaa7a728 100644 --- a/phpBB/modules/mcp/mcp_reports.php +++ b/phpBB/modules/mcp/mcp_reports.php @@ -146,7 +146,7 @@ class mcp_reports $message = bbcode_nl2br($message); $message = smiley_text($message); - if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) + if ($post_info['post_attachment'] && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $post_info['forum_id'])) { $extensions = phpbb_cache::obtain_extensions_forum($post_info['forum_id']); @@ -186,19 +186,19 @@ class mcp_reports $template->assign_vars(array( 'S_MCP_REPORT' => true, 'S_CLOSE_ACTION' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), - 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), + 'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], 'S_POST_LOCKED' => $post_info['post_edit_locked'], 'S_USER_NOTES' => true, - 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', + 'U_EDIT' => (phpbb::$acl->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', 'U_MCP_APPROVE' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORTER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $report['user_id']), 'U_MCP_USER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $post_info['user_id']), - 'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $report['user_id']) : '', - 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', + 'U_MCP_WARN_REPORTER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $report['user_id']) : '', + 'U_MCP_WARN_USER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $post_info['forum_id']), 'U_VIEW_POST' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), 'U_VIEW_TOPIC' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), @@ -229,10 +229,10 @@ class mcp_reports 'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : phpbb::$user->lang['NO_SUBJECT'], 'POST_DATE' => phpbb::$user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], - 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', + 'POST_IPADDR' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', 'POST_ID' => $post_info['post_id'], - 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '', + 'U_LOOKUP_IP' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '', )); $this->tpl_name = 'mcp_post'; diff --git a/phpBB/modules/mcp/mcp_topic.php b/phpBB/modules/mcp/mcp_topic.php index 32d5f5f8e6..8f645be185 100644 --- a/phpBB/modules/mcp/mcp_topic.php +++ b/phpBB/modules/mcp/mcp_topic.php @@ -73,7 +73,7 @@ function mcp_topic_view($id, $mode, $action) } // Approve posts? - if ($action == 'approve' && $auth->acl_get('m_approve', $topic_info['forum_id'])) + if ($action == 'approve' && phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) { include(PHPBB_ROOT_PATH . 'includes/mcp/mcp_queue.' . PHP_EXT); include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT); @@ -127,7 +127,7 @@ function mcp_topic_view($id, $mode, $action) FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . ' p.topic_id = ' . $topic_id . ' ' . - ((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . ' + ((!phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . ' AND p.poster_id = u.user_id ' . $limit_time_sql . ' ORDER BY ' . $sort_order_sql; @@ -172,7 +172,7 @@ function mcp_topic_view($id, $mode, $action) $extensions = phpbb_cache::obtain_extensions_forum($topic_info['forum_id']); // Get attachments... - if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id'])) + if (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $topic_info['forum_id'])) { $sql = 'SELECT * FROM ' . ATTACHMENTS_TABLE . ' @@ -235,8 +235,8 @@ function mcp_topic_view($id, $mode, $action) 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details" . (($forum_id) ? "&f=$forum_id" : ''), - 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', - 'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '') + 'U_MCP_APPROVE' => (phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', + 'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '') ); // Display not already displayed Attachments for this post, we already parsed them. ;) @@ -256,7 +256,7 @@ function mcp_topic_view($id, $mode, $action) // Display topic icons for split topic $s_topic_icons = false; - if ($auth->acl_get('m_split', $topic_info['forum_id'])) + if (phpbb::$acl->acl_get('m_split', $topic_info['forum_id'])) { include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT); $s_topic_icons = posting_gen_topic_icons('', $icon_id); @@ -274,7 +274,7 @@ function mcp_topic_view($id, $mode, $action) { $to_topic_info = $to_topic_info[$to_topic_id]; - if (!$to_topic_info['enable_icons'] || $auth->acl_get('!f_icons', $topic_info['forum_id'])) + if (!$to_topic_info['enable_icons'] || phpbb::$acl->acl_get('!f_icons', $topic_info['forum_id'])) { $s_topic_icons = false; } @@ -303,12 +303,12 @@ function mcp_topic_view($id, $mode, $action) 'S_MCP_ACTION' => "$url&i=$id&mode=$mode&action=$action&start=$start", 'S_FORUM_SELECT' => ($to_forum_id) ? make_forum_select($to_forum_id, false, false, true, true, true) : make_forum_select($topic_info['forum_id'], false, false, true, true, true), - 'S_CAN_SPLIT' => ($auth->acl_get('m_split', $topic_info['forum_id'])) ? true : false, - 'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false, - 'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false, - 'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false, - 'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false, - 'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false, + 'S_CAN_SPLIT' => (phpbb::$acl->acl_get('m_split', $topic_info['forum_id'])) ? true : false, + 'S_CAN_MERGE' => (phpbb::$acl->acl_get('m_merge', $topic_info['forum_id'])) ? true : false, + 'S_CAN_DELETE' => (phpbb::$acl->acl_get('m_delete', $topic_info['forum_id'])) ? true : false, + 'S_CAN_APPROVE' => ($has_unapproved_posts && phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? true : false, + 'S_CAN_LOCK' => (phpbb::$acl->acl_get('m_lock', $topic_info['forum_id'])) ? true : false, + 'S_CAN_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? true : false, 'S_REPORT_VIEW' => ($action == 'reports') ? true : false, 'S_MERGE_VIEW' => ($action == 'merge') ? true : false, 'S_SPLIT_VIEW' => ($action == 'split') ? true : false, @@ -442,7 +442,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) while ($row = $db->sql_fetchrow($result)) { // If split from selected post (split_beyond), we split the unapproved items too. - if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id'])) + if (!$row['post_approved'] && !phpbb::$acl->acl_get('m_approve', $row['forum_id'])) { // continue; } diff --git a/phpBB/modules/mcp/mcp_warn.php b/phpBB/modules/mcp/mcp_warn.php index 70862393df..05e994858a 100644 --- a/phpBB/modules/mcp/mcp_warn.php +++ b/phpBB/modules/mcp/mcp_warn.php @@ -169,7 +169,7 @@ class mcp_warn $template->assign_vars(array( 'U_POST_ACTION' => $this->u_action, - 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, + 'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, |