Skip to content

Commit f5c7b77

Browse files
committed
Merge branch '6.1' into 6.2
2 parents ce03e03 + 60dea0a commit f5c7b77

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

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

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

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

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,18 @@ public function isAffectedUser(ModerationQueue $queue, $userID)
187187
UserProfileRuntimeCache::getInstance()->getObject($userID)
188188
);
189189
}
190+
191+
/**
192+
* @inheritDoc
193+
*/
194+
public function canRemoveContent(ModerationQueue $queue)
195+
{
196+
if ($this->isValid($queue->objectID)) {
197+
$response = $this->getResponse($queue->objectID);
198+
199+
return $this->getCommentManager($response->getComment())->canDeleteResponse($response);
200+
}
201+
202+
return false;
203+
}
190204
}

0 commit comments

Comments
 (0)