public function DeleteComment($ID, $TK, $Target = '') { $Session = Gdn::Session(); if (!$Session->ValidateTransientKey($TK)) { throw PermissionException(); } $Comment = $this->ActivityModel->GetComment($ID); if (!$ID) { throw NotFoundException(); } if ($Session->CheckPermission('Garden.Activity.Delete') || ($Comment['InsertUserID'] = $Session->UserID)) { $this->ActivityModel->DeleteComment($ID); } else { throw PermissionException(); } if ($this->DeliveryType() === DELIVERY_TYPE_ALL) { Redirect($Target); } $this->Render('Blank', 'Utility', 'Dashboard'); }