diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-18 16:27:35 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-18 16:27:35 +0000 |
| commit | e264a62b731d29389ba0a4a3548070e259e373c0 (patch) | |
| tree | 8b4c935deb992a577cedd8123a46b2fcaf128d6d /phpBB/includes/mcp/mcp_reports.php | |
| parent | 5f788b4d08838dec5e8168f2efd515859224a3a4 (diff) | |
| download | forums-e264a62b731d29389ba0a4a3548070e259e373c0.tar forums-e264a62b731d29389ba0a4a3548070e259e373c0.tar.gz forums-e264a62b731d29389ba0a4a3548070e259e373c0.tar.bz2 forums-e264a62b731d29389ba0a4a3548070e259e373c0.tar.xz forums-e264a62b731d29389ba0a4a3548070e259e373c0.zip | |
- a handful of mcp fixed, the most important one is the change for check_ids() - it is now supporting ids from more than one forum too, making it possible to use some mcp features as designed initially. We really need to get our moderator team testing the mcp extensively.
- fixed some other tiny glitches
- if a forum category with subforums get changed to a link type forum give options of what to do with the subforums (#5334)
- other bugfixes
git-svn-id: file:///svn/phpbb/trunk@6601 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_reports.php')
| -rwxr-xr-x | phpBB/includes/mcp/mcp_reports.php | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 8fdc3ba7db..66452ad8e0 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -107,14 +107,6 @@ class mcp_reports ); } - // Set some vars - if ($post_info['user_id'] == ANONYMOUS) - { - $poster = ($post_info['post_username']) ? $post_info['post_username'] : $user->lang['GUEST']; - } - - $poster = ($post_info['user_colour']) ? '<span style="color:#' . $post_info['user_colour'] . '">' . $post_info['username'] . '</span>' : $post_info['username']; - // Process message, leave it uncensored $message = $post_info['post_text']; $message = str_replace("\n", '<br />', $message); @@ -129,7 +121,7 @@ class mcp_reports $template->assign_vars(array( 'S_MCP_REPORT' => true, - 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&p=$post_id&f=$forum_id"), + 'S_CLOSE_ACTION' => $this->u_action . '&p=' . $post_id . 'f=' . $forum_id, 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], @@ -150,7 +142,7 @@ class mcp_reports 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']), - 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&mode=reports' : '&mode=reports_closed') . '&start=' . $start) . '">', '</a>'), + 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&mode=reports' : '&mode=reports_closed') . '&start=' . $start . '&f=' . $post_info['forum_id']) . '">', '</a>'), 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']), 'REPORT_REASON_TITLE' => $reason['title'], 'REPORT_REASON_DESCRIPTION' => $reason['description'], @@ -284,7 +276,7 @@ class mcp_reports if (sizeof($report_ids)) { - $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, r.user_id as reporter_id, ru.username as reporter_name, r.report_time, r.report_id + $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . ' AND t.topic_id = p.topic_id @@ -306,18 +298,21 @@ class mcp_reports 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '', 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&start=$start&mode=report_details&f={$row['forum_id']}&r={$row['report_id']}"), - 'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['reporter_id']) : '', 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'REPORTER_FULL' => get_username_string('full', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'REPORTER_COLOUR' => get_username_string('colour', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'REPORTER' => get_username_string('username', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'U_REPORTER' => get_username_string('profile', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'FORUM_NAME' => (!$global_topic) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'POST_ID' => $row['post_id'], 'POST_SUBJECT' => $row['post_subject'], 'POST_TIME' => $user->format_date($row['post_time']), - 'REPORTER' => ($row['reporter_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $row['reporter_name'], 'REPORT_TIME' => $user->format_date($row['report_time']), 'TOPIC_TITLE' => $row['topic_title']) ); @@ -332,7 +327,7 @@ class mcp_reports 'L_TITLE' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN'] : $user->lang['MCP_REPORTS_CLOSED'], 'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '', - 'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')), + 'S_MCP_ACTION' => $this->u_action, 'S_FORUM_OPTIONS' => $forum_options, 'S_CLOSED' => ($mode == 'reports_closed') ? true : false, @@ -356,18 +351,18 @@ function close_report($post_id_list, $mode, $action) global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_report'))) + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report'))) { trigger_error('NOT_AUTHORIZED'); } if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false) { - $redirect = request_var('redirect', build_url(array('mode')) . '&mode=reports'); + $redirect = request_var('redirect', build_url(array('mode', '_f_', 'r')) . '&mode=reports'); } else { - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_'))); } $success_msg = ''; @@ -375,7 +370,6 @@ function close_report($post_id_list, $mode, $action) 'i' => 'reports', 'mode' => $mode, 'post_id_list' => $post_id_list, - 'f' => $forum_id, 'action' => $action, 'redirect' => $redirect) ); |
