Makes sure that done moderation queues stay marked done
authorMatthias Schmidt <gravatronics@live.com>
Mon, 5 Aug 2013 09:14:05 +0000 (11:14 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 5 Aug 2013 09:14:05 +0000 (11:14 +0200)
Fixes #1425

wcfsetup/install/files/lib/form/AbstractModerationForm.class.php

index 20a6f7728939b623d59a1a79fa83241272c59c78..69acb392e4ab6d1866d6a3d71e8d3bc289e2fae2 100644 (file)
@@ -139,16 +139,18 @@ abstract class AbstractModerationForm extends AbstractForm {
                        'assignedUserID' => ($this->assignedUserID ?: null),
                        'comment' => $this->comment
                );
-               if ($this->assignedUserID) {
-                       // queue item is being processed
-                       if ($this->assignedUserID != $this->queue->assignedUserID) {
-                               $this->data['status'] = ModerationQueue::STATUS_PROCESSING;
+               if ($this->queue->status != ModerationQueue::STATUS_DONE) {
+                       if ($this->assignedUserID) {
+                               // queue item is being processed
+                               if ($this->assignedUserID != $this->queue->assignedUserID) {
+                                       $this->data['status'] = ModerationQueue::STATUS_PROCESSING;
+                               }
                        }
-               }
-               else {
-                       // queue is no longer processed, mark as outstanding
-                       if ($this->queue->assignedUserID) {
-                               $this->data['status'] = ModerationQueue::STATUS_OUTSTANDING;
+                       else {
+                               // queue is no longer processed, mark as outstanding
+                               if ($this->queue->assignedUserID) {
+                                       $this->data['status'] = ModerationQueue::STATUS_OUTSTANDING;
+                               }
                        }
                }