Skip to content

Commit

Permalink
Merge pull request #5839 from WoltLab/bugfix/moderation-queue-comment…
Browse files Browse the repository at this point in the history
…s-notification

Delete orphaned moderation queue comment notifications
  • Loading branch information
BurntimeX authored Mar 8, 2024
2 parents 9cb9a1a + b49dc30 commit a386ae8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function checkAccess()
if (!WCF::getSession()->getPermission('mod.general.canUseModeration')) {
return false;
}
if (!$this->moderationQueue->queueID) {
return false;
}

return $this->moderationQueue->canEdit();
}
Expand Down Expand Up @@ -143,6 +146,9 @@ public function setObject(
$this->moderationQueue = new ViewableModerationQueue(
new ModerationQueue($this->getUserNotificationObject()->objectID)
);
if (!$this->moderationQueue->queueID) {
return;
}

/** @var IModerationQueueHandler $moderationHandler */
$moderationHandler = ObjectTypeCache::getInstance()
Expand Down

0 comments on commit a386ae8

Please sign in to comment.