Skip to content

Commit 60dea0a

Browse files
committed
Merge branch '6.0' into 6.1
2 parents 506184d + 3db9fc4 commit 60dea0a

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
@@ -144,6 +144,20 @@ public function populate(array $queues)
144144
}
145145
}
146146

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

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

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

0 commit comments

Comments
 (0)