コード例 #1
0
 /**
  * @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);
     }
 }