aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/report.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-04-08 14:30:46 +0000
committerNils Adermann <naderman@naderman.de>2006-04-08 14:30:46 +0000
commitc5b203b485c3ea805d54bb05629db1888f37438e (patch)
tree26571644c34ba3a650381ef5ea995758128893a4 /phpBB/report.php
parentfc167b2e42e4bd0f13b4057978180917ec30960d (diff)
downloadforums-c5b203b485c3ea805d54bb05629db1888f37438e.tar
forums-c5b203b485c3ea805d54bb05629db1888f37438e.tar.gz
forums-c5b203b485c3ea805d54bb05629db1888f37438e.tar.bz2
forums-c5b203b485c3ea805d54bb05629db1888f37438e.tar.xz
forums-c5b203b485c3ea805d54bb05629db1888f37438e.zip
- allow reporting posts that have a closed report
- show multiple reports for one post correctly - Bug #1389 git-svn-id: file:///svn/phpbb/trunk@5771 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/report.php')
-rw-r--r--phpBB/report.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/phpBB/report.php b/phpBB/report.php
index 61f1dd34d2..236b7008e4 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -69,17 +69,9 @@ foreach ($acl_check_ary as $acl => $error)
}
unset($acl_check_ary);
-// Check if the post has already been reported...
-$sql = 'SELECT report_id, report_closed
- FROM ' . REPORTS_TABLE . "
- WHERE post_id = $post_id";
-$result = $db->sql_query($sql);
-$row = $db->sql_fetchrow($result);
-$db->sql_freeresult($result);
-
-if ($row)
+if ($report_data['post_reported'])
{
- $message = ($row['report_closed']) ? $user->lang['REPORT_ALREADY_DEALT_WITH'] : $user->lang['ALREADY_REPORTED'];
+ $message = $user->lang['ALREADY_REPORTED'];
$message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $phpbb_root_path . $redirect_url . '">', '</a>');
trigger_error($message);
}
@@ -88,7 +80,7 @@ if ($row)
if (isset($_POST['submit']) && $reason_id)
{
$sql = 'SELECT *
- FROM ' . REASONS_TABLE . "
+ FROM ' . REASONS_TABLE . "
WHERE reason_id = $reason_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
@@ -115,16 +107,16 @@ if (isset($_POST['submit']) && $reason_id)
if (!$report_data['post_reported'])
{
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET post_reported = 1
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_reported = 1
WHERE post_id = ' . $post_id;
$db->sql_query($sql);
}
if (!$report_data['topic_reported'])
{
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_reported = 1
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_reported = 1
WHERE topic_id = ' . $report_data['topic_id'];
$db->sql_query($sql);
}