public function execute() { parent::execute(); $comment = new ServerCommentEditor($this->commentID); if ($comment->commentID == 0) { throw new IllegalLinkException(); } if (!BASHCore::getUser()->getPermission('mod.comment.moderatorPermissions') and $comment->authorID != BASHCore::getUser()->userID) { throw new PermissionDeniedException(); } ServerCommentEditor::remove($comment->commentID); HeaderUtil::redirect(BASHCore::getSession()->lastRequestURI, false); }
public function execute() { parent::execute(); $entry = new BashEntryEditor($this->entryID); if ($entry->entryID == 0) { throw new IllegalLinkException(); } if (!BASHCore::getUser()->getPermission('mod.bash.moderatorPermissions')) { throw new PermissionDeniedException(); } $entry->isDisabled = 0; $entry->update(); HeaderUtil::redirect(BASHCore::getSession()->lastRequestURI, false); }
/** * @see Action::execute() */ public function execute() { parent::execute(); $entry = new BashEntryEditor($this->entryID); if ($entry->entryID == 0) { throw new IllegalLinkException(); } if (!$entry->isFavorite()) { $entry->favorite(); } if (!isset($_REQUEST['ajax'])) { HeaderUtil::redirect(BASHCore::getSession()->lastRequestURI, false); } }
/** * @see Action::execute() */ public function execute() { parent::execute(); $entry = new BashEntryEditor($this->entryID); if ($entry->entryID == 0) { throw new IllegalLinkException(); } if (!BASHCore::getUser()->getPermission('mod.bash.moderatorPermissions') and BASHCore::getUser()->userID != $entry->authorID) { throw new PermissionDeniedException(); } BashEntryEditor::remove($entry->entryID); if (!isset($_REQUEST['ajax'])) { HeaderUtil::redirect(BASHCore::getSession()->lastRequestURI, false); } }