/**
  * @see Form::save()
  */
 public function save()
 {
     MessageForm::save();
     //$this->entry->update()
     $this->saved();
     HeaderUtil::redirect('index.php?page=CheatDatabaseEntry&entryID=' . $this->entry->entryID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     MessageForm::save();
     // save solution
     $this->entry->update($this->text, $this->state, $this->getOptions(), $this->attachmentListEditor);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=ContestSolutionEntry' . '&contestID=' . $this->entry->contestID . '&solutionID=' . $this->entry->solutionID . SID_ARG_2ND_NOT_ENCODED . '#solution' . $this->entry->solutionID);
     exit;
 }
 public function save()
 {
     parent::save();
     $this->entry->subject = $this->subject;
     $this->entry->text = $this->text;
     $this->entry->enableSmilies = $this->enableSmilies;
     $this->entry->enableHTML = $this->enableHtml;
     $this->entry->enableBBCodes = $this->enableBBCodes;
     $this->entry->update();
     HeaderUtil::redirect('index.php?page=Index' . SID_ARG_2ND_NOT_ENCODED . '#entry' . $this->entry->entryID);
 }
 public function save()
 {
     parent::save();
     if ($this->server == null) {
         $this->server = new Server($this->serverID);
     }
     $comment = ServerCommentEditor::create($this->server->serverID, BASHCore::getUser()->userID, $this->username, $this->text, TIME_NOW, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, BASHCore::getUser()->userID > 0 ? false : true);
     if (MODULE_USER_RANK and BASHCore::getUser()->userID > 0) {
         require_once WCF_DIR . 'lib/data/user/rank/UserRank.class.php';
         UserRank::updateActivityPoints(SERVER_COMMENT_USER_ACTIVITY_POINTS);
     }
     HeaderUtil::redirect('index.php?page=ServerDetail&serverID=' . $comment->serverID . SID_ARG_2ND_NOT_ENCODED . '#comment' . $comment->commentID);
 }
 /**
  * @see	Form::save()
  */
 public function save()
 {
     MessageForm::save();
     // update item
     $this->item->update($this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, TIME_NOW, $this->username, $this->item->editCount + 1, $this->item->timestamp, $this->item->authorID, $this->item->username, $this->item->isPublic, $this->item->isDeleted);
     // clear cache
     DynamicNewsItemEditor::clearCache($this->item->instanceID);
     // redirect
     if (!empty(WCF::getSession()->lastRequestURI)) {
         HeaderUtil::redirect(WCF::getSession()->lastRequestURI . '#newsPageModule' . $this->item->instanceID . 'Item' . $item->itemID);
     } else {
         HeaderUtil::redirect('index.php?page=Index');
     }
 }
	/**
	 * @see Form::save()
	 */
	public function save() {
		parent::save();
		
		$this->page = UserCustomPageEditor::create(
			$this->frame->getUser()->userID,
			$this->pageName,
			$this->subject,
			$this->text,
			$this->menuItem
		);
		
		$this->saved();
		
		HeaderUtil::redirect('index.php?page=UserCustomPage&userID='.$this->frame->getUser()->userID.'&pageName='.$this->pageName.SID_ARG_2ND_NOT_ENCODED);
		exit;
	}
 /**
  * @see Form::save()
  */
 public function save()
 {
     MessageForm::save();
     //create date
     $date = (string) $this->dateValues['year'] . '-' . (string) $this->dateValues['month'] . '-' . (string) $this->dateValues['day'] . (MESSAGE_NEWSLETTERSYSTEM_GENERAL_HOURLYCRONJOB ? ' ' . (string) $this->dateValues['hour'] . ':00:00' : '');
     //convert date to timestamp
     $unixTime = strtotime($date);
     $newsletter = new NewsletterEditor($this->newsletterID);
     $newsletter->update(WCF::getUser()->userID, WCF::getUser()->username, $unixTime, $this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
     $this->saved();
     if ($this->sendTestmail) {
         $this->sendTestmail($newsletter);
     }
     $this->success = true;
     //resetting cache
     $cacheName = 'newsletter-' . PACKAGE_ID;
     WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.' . $cacheName . '.php');
 }
 /**
  * @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();
 }
 /**
  * @see	Form::save()
  */
 public function save()
 {
     parent::save();
     // create entry
     $item = DynamicNewsItemEditor::create($this->instanceID, $this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, 0, '', 0, TIME_NOW, $this->user->userID, $this->user->username, false, true, $this->attachmentListEditor);
     // clear cache
     DynamicNewsItemEditor::clearCache($this->instanceID);
     // redirect
     if (!empty(WCF::getSession()->lastRequestURI)) {
         HeaderUtil::redirect(WCF::getSession()->lastRequestURI . '#newsPageModule' . $this->instanceID . 'Item' . $item->itemID);
     } else {
         HeaderUtil::redirect('index.php?page=Index');
     }
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     if (!$this->canEditPost()) {
         throw new PermissionDeniedException();
     }
     // set the language temporarily to the thread language
     if ($this->thread->languageID && $this->thread->languageID != WCF::getLanguage()->getLanguageID()) {
         $this->setLanguage($this->thread->languageID);
     }
     MessageForm::save();
     // update subscription
     $this->thread->setSubscription($this->subscription);
     // save poll
     if ($this->showPoll) {
         $this->pollEditor->save();
     }
     // add edit note
     $postData = array();
     if (!$this->hideEditNote && (WCF::getUser()->userID != $this->post->userID || $this->post->time <= TIME_NOW - POST_EDIT_HIDE_EDIT_NOTE_PERIOD * 60)) {
         $postData['editor'] = WCF::getUser()->username;
         $postData['editorID'] = WCF::getUser()->userID;
         $postData['lastEditTime'] = TIME_NOW;
         $postData['editCount'] = $this->post->editCount + 1;
         $postData['editReason'] = $this->editReason;
     } else {
         if (!empty($this->editReason)) {
             $postData['editReason'] = $this->editReason;
         }
     }
     // update database entry
     $this->post->update($this->subject, $this->text, $this->getOptions(), $this->attachmentListEditor, $this->pollEditor, $postData);
     // reset language
     if ($this->userInterfaceLanguageID !== null) {
         $this->setLanguage($this->userInterfaceLanguageID, true);
     }
     $threadData = array();
     if ($this->thread->firstPostID == $this->post->postID) {
         // update thread topic
         if (!empty($this->subject)) {
             $threadData['topic'] = $this->subject;
         }
         // update thread prefix
         if ($this->board->getPermission('canUsePrefix')) {
             $threadData['prefix'] = $this->prefix;
         }
         // save tags
         if (MODULE_TAGGING && THREAD_ENABLE_TAGS && $this->board->getPermission('canSetTags')) {
             $this->thread->updateTags(TaggingUtil::splitString($this->tags));
         }
         // announcement
         if ($this->board->getModeratorPermission('canStartAnnouncement')) {
             if ($this->thread->isAnnouncement) {
                 $this->thread->removeAssignedBoards();
             }
             if ($this->isImportant == 2) {
                 $this->thread->assignBoards($this->boardIDs);
             }
             $threadData['isAnnouncement'] = intval($this->isImportant == 2);
         }
         // pin thread
         if ($this->board->getModeratorPermission('canPinThread')) {
             $threadData['isSticky'] = intval($this->isImportant == 1);
         }
         // set language
         if ($this->languageID != $this->thread->languageID) {
             $threadData['languageID'] = $this->languageID;
         }
     }
     // close / open thread
     if ($this->board->getModeratorPermission('canCloseThread')) {
         if (!$this->thread->isClosed && $this->closeThread) {
             $threadData['isClosed'] = 1;
         } else {
             if ($this->thread->isClosed && !$this->closeThread) {
                 $threadData['isClosed'] = 0;
             }
         }
     }
     // update thread
     $this->thread->update($threadData);
     // update last posts
     if ($this->thread->firstPostID == $this->post->postID && $this->languageID != $this->thread->languageID) {
         $this->board->setLastPosts();
         WCF::getCache()->clearResource('boardData');
     }
     $this->saved();
     // forward to post
     $url = 'index.php?page=Thread&postID=' . $this->postID . SID_ARG_2ND_NOT_ENCODED . '#post' . $this->postID;
     HeaderUtil::redirect($url);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save changes
     $this->signatureCache = MessageParser::getInstance()->parse($this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, false);
     $fields = array('signature' => $this->text, 'signatureCache' => $this->signatureCache, 'enableSignatureSmilies' => $this->enableSmilies, 'enableSignatureHtml' => $this->enableHtml, 'enableSignatureBBCodes' => $this->enableBBCodes);
     $editor = WCF::getUser()->getEditor();
     $editor->updateFields($fields);
     $editor->updateOptions(array('wysiwygEditorMode' => $this->wysiwygEditorMode, 'wysiwygEditorHeight' => $this->wysiwygEditorHeight));
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     // set the language temporarily to the thread language
     if ($this->languageID && $this->languageID != WCF::getLanguage()->getLanguageID()) {
         $this->setLanguage($this->languageID);
     }
     parent::save();
     // search for double posts
     if ($postID = PostEditor::test($this->subject, $this->text, WCF::getUser()->userID, $this->username)) {
         HeaderUtil::redirect('index.php?page=Thread&postID=' . $postID . SID_ARG_2ND_NOT_ENCODED . '#post' . $postID);
         exit;
     }
     // save poll
     if ($this->showPoll) {
         $this->pollEditor->save();
     }
     // save thread in database
     $this->newThread = ThreadEditor::create($this->board->boardID, $this->languageID, $this->prefix, $this->subject, $this->text, WCF::getUser()->userID, $this->username, intval($this->isImportant == 1), intval($this->isImportant == 2), $this->closeThread, $this->getOptions(), $this->subscription, $this->attachmentListEditor, $this->pollEditor, intval($this->disableThread || !$this->board->getPermission('canStartThreadWithoutModeration')));
     if ($this->isImportant == 2) {
         $this->newThread->assignBoards($this->boardIDs);
     }
     // save tags
     if (MODULE_TAGGING && THREAD_ENABLE_TAGS && $this->board->getPermission('canSetTags')) {
         $tagArray = TaggingUtil::splitString($this->tags);
         if (count($tagArray)) {
             $this->newThread->updateTags($tagArray);
         }
     }
     // reset language
     if ($this->userInterfaceLanguageID !== null) {
         $this->setLanguage($this->userInterfaceLanguageID, true);
     }
     if (!$this->disableThread && $this->board->getPermission('canStartThreadWithoutModeration')) {
         // update user posts
         if (WCF::getUser()->userID && $this->board->countUserPosts) {
             require_once WBB_DIR . 'lib/data/user/WBBUser.class.php';
             WBBUser::updateUserPosts(WCF::getUser()->userID, 1);
             if (ACTIVITY_POINTS_PER_THREAD) {
                 require_once WCF_DIR . 'lib/data/user/rank/UserRank.class.php';
                 UserRank::updateActivityPoints(ACTIVITY_POINTS_PER_THREAD);
             }
         }
         // refresh counter and last post
         $this->board->addThreads();
         $this->board->setLastPost($this->newThread);
         // reset stat cache
         WCF::getCache()->clearResource('stat');
         WCF::getCache()->clearResource('boardData');
         // send notifications
         $this->newThread->sendNotification(new Post(null, array('postID' => $this->newThread->firstPostID, 'message' => $this->text, 'enableSmilies' => $this->enableSmilies, 'enableHtml' => $this->enableHtml, 'enableBBCodes' => $this->enableBBCodes)), $this->attachmentListEditor);
         $this->saved();
         // forward to post
         HeaderUtil::redirect('index.php?page=Thread&threadID=' . $this->newThread->threadID . SID_ARG_2ND_NOT_ENCODED);
     } else {
         $this->saved();
         if ($this->disableThread) {
             // forward to post
             HeaderUtil::redirect('index.php?page=Thread&threadID=' . $this->newThread->threadID . SID_ARG_2ND_NOT_ENCODED);
         } else {
             WCF::getTPL()->assign(array('url' => 'index.php?page=Board&boardID=' . $this->boardID . SID_ARG_2ND_NOT_ENCODED, 'message' => WCF::getLanguage()->get('wbb.threadAdd.moderation.redirect'), 'wait' => 5));
             WCF::getTPL()->display('redirect');
         }
     }
     exit;
 }
예제 #13
0
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save message in database
     $update = $this->pm && !$this->forwarding && !$this->reply;
     // search for double posts
     if (!$update && PMEditor::test($this->recipientArray, $this->blindCopyArray, $this->subject, $this->text, WCF::getUser()->userID, WCF::getUser()->username)) {
         HeaderUtil::redirect('index.php?page=PMList' . SID_ARG_2ND_NOT_ENCODED);
         exit;
     }
     if ($update) {
         $this->pm->update($this->draft, $this->recipientArray, $this->blindCopyArray, $this->subject, $this->text, $this->getOptions(), $this->attachmentListEditor);
         $this->newPm = new PMEditor($this->pm->pmID);
     } else {
         $this->newPm = PMEditor::create($this->draft, $this->recipientArray, $this->blindCopyArray, $this->subject, $this->text, WCF::getUser()->userID, WCF::getUser()->username, $this->getOptions(), $this->attachmentListEditor, $this->pm && $this->reply ? $this->pm->parentPmID : 0);
     }
     // reply & forwarding
     if ($this->pmID) {
         if ($this->reply) {
             $this->pm->markAsReplied();
         }
         if ($this->forwarding) {
             $this->pm->markAsForwarded();
         }
     }
     // send e-mail notification
     if (!$this->draft) {
         $this->sendNotification();
     }
     // apply rules
     if (!$this->draft) {
         $this->newPm->applyRules();
     }
     $this->saved();
     // forward to pm index
     if ($this->draft) {
         HeaderUtil::redirect('index.php?page=PMList&folderID=-2' . SID_ARG_2ND_NOT_ENCODED);
     } else {
         HeaderUtil::redirect('index.php?page=PMList' . SID_ARG_2ND_NOT_ENCODED);
     }
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     $participant = ContestParticipant::find($this->contest->contestID, $this->userID, $this->groupID);
     if ($participant === null) {
         require_once WCF_DIR . 'lib/data/contest/participant/ContestParticipantEditor.class.php';
         $state = $this->contest->enableParticipantCheck ? 'applied' : 'accepted';
         $participant = ContestParticipantEditor::create($this->contest->contestID, $this->userID, $this->groupID, $state);
     }
     // save solution
     $solution = ContestSolutionEditor::create($this->contest->contestID, $participant->participantID, $this->text, $this->state, $this->getOptions(), $this->attachmentListEditor);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=ContestSolutionEntry&contestID=' . $this->contest->contestID . '&solutionID=' . $solution->solutionID . SID_ARG_2ND_NOT_ENCODED . '#solution' . $solution->solutionID);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     //$this->entry = EntryEditor::create();
     $this->saved();
     HeaderUtil::redirect('index.php?page=CheatDatabaseEntry&entryID=' . $this->entry->entryID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     if ($this->sponsorID) {
         $sponsor = new ContestSponsor($this->sponsorID);
     } else {
         $sponsor = ContestSponsor::find($this->contest->contestID, $this->userID, $this->groupID);
     }
     if ($sponsor === null) {
         require_once WCF_DIR . 'lib/data/contest/sponsor/ContestSponsorEditor.class.php';
         $state = $this->contest->enableSponsorCheck ? 'applied' : 'accepted';
         $sponsor = ContestSponsorEditor::create($this->contest->contestID, $this->userID, $this->groupID, $state);
     }
     // save price
     $price = ContestPriceEditor::create($this->contest->contestID, $sponsor->sponsorID, $this->subject, $this->text, $this->secretMessage, $this->attachmentListEditor);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=ContestPrice&contestID=' . $this->contest->contestID . '&priceID=' . $price->priceID . SID_ARG_2ND_NOT_ENCODED . '#priceObj' . $price->priceID);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // insert/update
     $newEntry = new UserGuestbookData($this->userID);
     if ($this->action == 'edit') {
         $newEntry->updateEntry($this->id, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
     } else {
         if ($this->action == 'comment') {
             $newEntry->addComment($this->id, $this->text);
         } else {
             $newEntry->addEntry(WCF::getUser()->userID, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
         }
     }
     // forward to Guestbook
     HeaderUtil::redirect('index.php?page=UserGuestbook&userID=' . $this->userID . '' . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
예제 #18
0
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     $state = 'private';
     // save entry
     $entry = ContestEditor::create($this->userID, $this->groupID, $this->subject, $this->text, $this->getOptions(), $state, $this->classIDArray, $this->participants, $this->jurys, $this->prices, $this->sponsors, $this->attachmentListEditor);
     $this->saved();
     $contestID = $entry->contestID;
     if ($this->sponsortalk_trigger) {
         require_once WCF_DIR . 'lib/data/contest/sponsortalk/ContestSponsortalkEditor.class.php';
         $sponsortalk = ContestSponsortalkEditor::create($contestID, $this->sponsortalk_message, WCF::getUser()->userID, WCF::getUser()->username);
     }
     if ($this->jurytalk_trigger) {
         require_once WCF_DIR . 'lib/data/contest/jurytalk/ContestJurytalkEditor.class.php';
         $jurytalk = ContestJurytalkEditor::create($contestID, $this->jurytalk_message, WCF::getUser()->userID, WCF::getUser()->username);
     }
     if ($this->comment_trigger) {
         require_once WCF_DIR . 'lib/data/contest/comment/ContestCommentEditor.class.php';
         $comment = ContestCommentEditor::create($contestID, $this->comment_message, WCF::getUser()->userID, WCF::getUser()->username);
     }
     // save tags
     if (MODULE_TAGGING) {
         $tagArray = TaggingUtil::splitString($this->tags);
         if (count($tagArray)) {
             $entry->updateTags($tagArray);
         }
     }
     // forward
     HeaderUtil::redirect('index.php?page=Contest&contestID=' . $entry->contestID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     $fields = array('enableWantedPosterSmilies' => $this->enableSmilies, 'enableWantedPosterHtml' => $this->enableHtml, 'enableWantedPosterBBCodes' => $this->enableBBCodes);
     $editor = WCF::getUser()->getEditor();
     $editor->updateFields($fields);
     $editor->updateOptions(array('wysiwygEditorMode' => $this->wysiwygEditorMode, 'wysiwygEditorHeight' => $this->wysiwygEditorHeight));
     parent::save();
     if ($this->tplSelect) {
         return;
     }
     $modEntry = new UserWantedPosterData($this->userID);
     $modEntry->modEntry($this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
     // forward
     header('Location: ' . FileUtil::addTrailingSlash(dirname(WCF::getSession()->requestURI)) . 'index.php?page=UserWantedPoster&userID=' . $this->userID . '' . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see	Form::save()
  */
 public function save()
 {
     parent::save();
     $entry = NewsEntryEditor::create(WCF::getUser()->userID, $this->username, $this->subject, $this->text, TIME_NOW, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
     HeaderUtil::redirect('index.php?page=Index' . SID_ARG_2ND_NOT_ENCODED . '#entry' . $entry->entryID);
     // call event
     $this->saved();
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     // set the language temporarily to the thread language
     if ($this->thread->languageID && $this->thread->languageID != WCF::getLanguage()->getLanguageID()) {
         $this->setLanguage($this->thread->languageID);
     }
     MessageForm::save();
     if ($this->thread->isDisabled) {
         $this->disablePost = 1;
     }
     // search for double posts
     if ($postID = PostEditor::test($this->subject, $this->text, WCF::getUser()->userID, $this->username, $this->threadID)) {
         HeaderUtil::redirect('index.php?page=Thread&postID=' . $postID . SID_ARG_2ND_NOT_ENCODED . '#post' . $postID);
         exit;
     }
     // save poll
     if ($this->showPoll) {
         $this->pollEditor->save();
     }
     // save post in database
     $this->newPost = PostEditor::create($this->thread->threadID, $this->subject, $this->text, WCF::getUser()->userID, $this->username, $this->getOptions(), $this->attachmentListEditor, $this->pollEditor, null, intval($this->disablePost || !$this->board->getPermission('canReplyThreadWithoutModeration')));
     // reset language
     if ($this->userInterfaceLanguageID !== null) {
         $this->setLanguage($this->userInterfaceLanguageID, true);
     }
     // remove quotes
     $sessionVars = WCF::getSession()->getVars();
     if (isset($sessionVars['quotes'][$this->threadID])) {
         unset($sessionVars['quotes'][$this->threadID]);
         WCF::getSession()->register('quotes', $sessionVars['quotes']);
     }
     if (!$this->disablePost && $this->board->getPermission('canReplyThreadWithoutModeration')) {
         // refresh thread
         $this->thread->addPost($this->newPost, $this->closeThread);
         // update subscription
         $this->thread->setSubscription($this->subscription);
         // update user posts
         if (WCF::getUser()->userID && $this->board->countUserPosts) {
             WBBUser::updateUserPosts(WCF::getUser()->userID, 1);
             if (ACTIVITY_POINTS_PER_POST) {
                 require_once WCF_DIR . 'lib/data/user/rank/UserRank.class.php';
                 UserRank::updateActivityPoints(ACTIVITY_POINTS_PER_POST);
             }
         }
         // refresh counter and last post
         $this->board->addPosts();
         $this->board->setLastPost($this->thread);
         // close / open thread
         if (!$this->thread->isClosed && $this->closeThread) {
             $this->thread->close();
         } else {
             if ($this->thread->isClosed && !$this->closeThread) {
                 $this->thread->open();
             }
         }
         // mark as done
         if ($this->markAsDone == 1) {
             $this->thread->markAsDone();
         } else {
             if (MODULE_THREAD_MARKING_AS_DONE && $this->board->enableMarkingAsDone && $this->thread->isDone && WCF::getUser()->userID && WCF::getUser()->userID == $this->thread->userID) {
                 $this->thread->markAsUndone();
             }
         }
         // reset stat cache
         WCF::getCache()->clearResource('stat');
         WCF::getCache()->clearResource('boardData');
         // send notifications
         $this->newPost->sendNotification($this->thread, $this->board, $this->attachmentListEditor);
         $this->saved();
         // forward to post
         $url = 'index.php?page=Thread&postID=' . $this->newPost->postID . SID_ARG_2ND_NOT_ENCODED . '#post' . $this->newPost->postID;
         HeaderUtil::redirect($url);
     } else {
         $this->saved();
         if ($this->disablePost) {
             HeaderUtil::redirect('index.php?page=Thread&postID=' . $this->newPost->postID . SID_ARG_2ND_NOT_ENCODED . '#post' . $this->newPost->postID);
         } else {
             WCF::getTPL()->assign(array('url' => 'index.php?page=Thread&threadID=' . $this->threadID . SID_ARG_2ND_NOT_ENCODED, 'message' => WCF::getLanguage()->get('wbb.postAdd.moderation.redirect'), 'wait' => 5));
             WCF::getTPL()->display('redirect');
         }
     }
     exit;
 }
 /**
  * @see	Form::save()
  */
 public function save()
 {
     parent::save();
     $options = $this->getOptions();
     $this->newGuestbookEntry = UserGuestbookEntryEditor::create($this->frame->getUser()->userID, $this->authorID, $this->authorname, $this->text, $this->ipAddress, (bool) $options['enableSmilies'], (bool) $options['enableHtml'], (bool) $options['enableBBCodes']);
     $this->saved();
     HeaderUtil::redirect('index.php?page=UserGuestbook&userID=' . $this->frame->getUser()->userID . '&entryID=' . $this->newGuestbookEntry->entryID . SID_ARG_2ND_NOT_ENCODED . '#entry' . $this->newGuestbookEntry->entryID);
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save entry
     $this->entry->update($this->userID, $this->groupID, $this->subject, $this->text, $this->fromTime, $this->untilTime, $this->state, $this->getOptions(), $this->classIDArray, $this->attachmentListEditor);
     $this->saved();
     // save tags
     if (MODULE_TAGGING) {
         $tagArray = TaggingUtil::splitString($this->tags);
         if (count($tagArray)) {
             $this->entry->updateTags($tagArray);
         }
     }
     // forward
     HeaderUtil::redirect('index.php?page=Contest&contestID=' . $this->entry->contestID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }