Skip to content

Commit 3db9fc4

Browse files
committed
1 parent cb75d1c commit 3db9fc4

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,20 @@ public function populate(array $queues)
142142
}
143143
}
144144

145+
/**
146+
* @inheritDoc
147+
*/
148+
public function canRemoveContent(ModerationQueue $queue)
149+
{
150+
if ($this->isValid($queue->objectID)) {
151+
$comment = $this->getComment($queue->objectID);
152+
153+
return $this->getCommentManager($comment)->canDeleteComment($comment);
154+
}
155+
156+
return false;
157+
}
158+
145159
/**
146160
* @inheritDoc
147161
*/

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,18 @@ public function removeContent(ModerationQueue $queue, $message)
163163
$responseAction->executeAction();
164164
}
165165
}
166+
167+
/**
168+
* @inheritDoc
169+
*/
170+
public function canRemoveContent(ModerationQueue $queue)
171+
{
172+
if ($this->isValid($queue->objectID)) {
173+
$response = $this->getResponse($queue->objectID);
174+
175+
return $this->getCommentManager($response->getComment())->canDeleteResponse($response);
176+
}
177+
178+
return false;
179+
}
166180
}

0 commit comments

Comments
 (0)