Fixed adding comments to moderation queues
authorAlexander Ebert <ebert@woltlab.com>
Thu, 9 Mar 2017 22:31:42 +0000 (23:31 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 9 Mar 2017 22:31:42 +0000 (23:31 +0100)
wcfsetup/install/files/lib/data/comment/CommentAction.class.php
wcfsetup/install/files/lib/system/comment/manager/ModerationQueueCommentManager.class.php

index e3766aca5d2a21420352183aa7c7e229a53e68c1..42b0c10b8faf561c20ec816525534a4ac6a3b2ad 100644 (file)
@@ -374,7 +374,7 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli
                                $notificationObjectType = UserNotificationHandler::getInstance()->getObjectTypeProcessor($objectType->objectType . '.notification');
                                
                                if ($notificationObjectType instanceof IMultiRecipientCommentUserNotificationObjectType) {
-                                       $recipientIDs = $notificationObjectType->getRecipientIDs($comment);
+                                       $recipientIDs = $notificationObjectType->getRecipientIDs($comment->getDecoratedObject());
                                        
                                        // make sure that the active user gets no notification
                                        $recipientIDs = array_diff($recipientIDs, [WCF::getUser()->userID]);
index 31ccda75b4f8bf37e81f9e9cf6631effdf35231e..40be2ac18c8e595e80590fedfe18573a0cc742cd 100644 (file)
@@ -21,6 +21,13 @@ class ModerationQueueCommentManager extends AbstractCommentManager {
                return $entry->canEdit();
        }
        
+       /**
+        * @inheritDoc
+        */
+       public function canAddWithoutApproval($objectID) {
+               return true;
+       }
+       
        /**
         * @inheritDoc
         */