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);
     }
 }
 /**
  * @see	Form:.save()
  */
 public function save()
 {
     parent::save();
     $entry = BashEntryEditor::create(BASHCore::getUser()->userID, $this->username, $this->serverID, $this->serverName, $this->text, TIME_NOW, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
     if (MODULE_USER_RANK and BASHCore::getUser()->userID > 0) {
         require_once WCF_DIR . 'lib/data/user/rank/UserRank.class.php';
         UserRank::updateActivityPoints(BASH_USER_ACTIVITY_POINTS);
     }
     if (WCF::getUser()->userID > 0) {
         HeaderUtil::redirect('index.php?page=BashEntry&entryID=' . $entry->entryID . SID_ARG_2ND_NOT_ENCODED);
     } else {
         // redirect to index
         WCF::getTPL()->assign(array('url' => 'index.php' . SID_ARG_1ST, 'message' => WCF::getLanguage()->get('bash.page.bashEntryAdd.guestRedirect'), 'wait' => 10));
         WCF::getTPL()->display('redirect');
         exit;
     }
     // call event
     $this->saved();
 }