Fix reporting content with non-outstanding moderation queue entry
authorMatthias Schmidt <gravatronics@live.com>
Sat, 28 Feb 2015 12:13:25 +0000 (13:13 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 28 Feb 2015 12:13:25 +0000 (13:13 +0100)
35e19e581a5e61f13d37e536710604283b1f0ebf did not adjust `ModerationQueueReportManager::hasPendingReport()` to consider the new moderation queue statuses `ModerationQueue::STATUS_REJECTED` and `ModerationQueue::STATUS_CONFIRMED` so that once reported content could not be reported again.

wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueReportManager.class.php

index 401a33863c052ad2d7c4d1c61f41f5e0952f686a..6c28d06737f59e6d0a137368e0313ca2518d02b0 100644 (file)
@@ -62,12 +62,13 @@ class ModerationQueueReportManager extends AbstractModerationQueueManager {
                        FROM    wcf".WCF_N."_moderation_queue
                        WHERE   objectTypeID = ?
                                AND objectID = ?
-                               AND status <> ?";
+                               AND status IN (?, ?)";
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute(array(
                        $objectTypeID,
                        $objectID,
-                       ModerationQueue::STATUS_DONE
+                       ModerationQueue::STATUS_OUTSTANDING,
+                       ModerationQueue::STATUS_PROCESSING
                ));
                
                return $statement->fetchColumn() > 0;