aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-06-09 19:37:47 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-06-09 19:37:47 +0000
commit0cf31f0e2a3ad652b924ac4efbf5d7433c831397 (patch)
tree041ebe56fb754ff6ab5ee5b5682e228b7b5848aa /phpBB/includes
parent898decd6cc4876269d14071431898fd8f547556e (diff)
downloadforums-0cf31f0e2a3ad652b924ac4efbf5d7433c831397.tar
forums-0cf31f0e2a3ad652b924ac4efbf5d7433c831397.tar.gz
forums-0cf31f0e2a3ad652b924ac4efbf5d7433c831397.tar.bz2
forums-0cf31f0e2a3ad652b924ac4efbf5d7433c831397.tar.xz
forums-0cf31f0e2a3ad652b924ac4efbf5d7433c831397.zip
Fix the ability to report/view reports and warn in global announcements
git-svn-id: file:///svn/phpbb/trunk@6030 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rwxr-xr-xphpBB/includes/mcp/mcp_reports.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 41526254f0..3920490114 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -213,11 +213,16 @@ class mcp_reports
$forum_list = $forum_id;
}
+ $forum_list .= ', 0';
+ $forum_data = array();
+
$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
foreach ($forum_list_reports as $row)
{
$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . $row['forum_name'] . '</option>';
+ $forum_data[$row['forum_id']] = $row;
}
+ unset($forum_list_reports);
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
@@ -259,12 +264,11 @@ class mcp_reports
if (sizeof($post_ids))
{
- $sql = 'SELECT f.forum_id, f.forum_name, 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
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t, ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u, ' . USERS_TABLE . " ru
+ $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
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u, ' . USERS_TABLE . " ru
WHERE p.post_id IN (" . implode(', ', $post_ids) . ")
AND t.topic_id = p.topic_id
AND r.post_id = p.post_id
- AND f.forum_id = p.forum_id
AND u.user_id = p.poster_id
AND ru.user_id = r.user_id";
@@ -302,7 +306,7 @@ class mcp_reports
'S_CHECKBOX' => $s_checkbox,
- 'FORUM_NAME' => $row['forum_name'],
+ 'FORUM_NAME' => ($row['forum_id']) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['ALL_FORUMS'],
'POSTER' => $poster,
'POST_SUBJECT' => $row['post_subject'],
'POST_TIME' => $user->format_date($row['post_time']),