From: Matthias Schmidt Date: Fri, 7 May 2021 10:07:57 +0000 (+0200) Subject: Fix deleting content from moderation activation page X-Git-Tag: 5.4.0_Alpha_2~39 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a6878d3639b42757557ac6daed8b3487bfa917e;p=GitHub%2FWoltLab%2FWCF.git Fix deleting content from moderation activation page --- diff --git a/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueActivationAction.class.php b/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueActivationAction.class.php index 3d02f8963f..35d184d085 100644 --- a/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueActivationAction.class.php +++ b/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueActivationAction.class.php @@ -75,8 +75,10 @@ class ModerationQueueActivationAction extends ModerationQueueAction $this->readString('message', true); $this->validateEnableContent(); - if (!ModerationQueueActivationManager::getInstance()->canRemoveContent($this->queue->getDecoratedObject())) { - throw new PermissionDeniedException(); + foreach ($this->getObjects() as $moderationQueueEditor) { + if (!ModerationQueueActivationManager::getInstance()->canRemoveContent($moderationQueueEditor->getDecoratedObject())) { + throw new PermissionDeniedException(); + } } } @@ -85,13 +87,14 @@ class ModerationQueueActivationAction extends ModerationQueueAction */ public function removeContent() { - // mark content as deleted - ModerationQueueActivationManager::getInstance()->removeContent( - $this->queue->getDecoratedObject(), - $this->parameters['message'] - ); + foreach ($this->getObjects() as $moderationQueueEditor) { + ModerationQueueActivationManager::getInstance()->removeContent( + $moderationQueueEditor->getDecoratedObject(), + $this->parameters['message'] + ); - $this->queue->markAsRejected(); + $moderationQueueEditor->markAsRejected(); + } $this->unmarkItems(); }