/**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // add edit note
     $postData = array();
     if (!$this->board->getPermission('canHideEditNote') && (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'] = '';
     }
     // update message
     $this->post->updateMessage($this->text, $postData);
     if ($this->thread->firstPostID == $this->post->postID) {
         // update first post preview
         $this->post->updateFirstPostPreview($this->post->threadID, $this->post->postID, $this->text, array('enableSmilies' => $this->post->enableSmilies, 'enableHtml' => $this->post->enableHtml, 'enableBBCodes' => $this->post->enableBBCodes));
     }
     $this->executed();
     // get new formatted message and return it
     $postList = new PostList();
     $postList->sqlConditions = 'post.postID = ' . $this->postID;
     $postList->readPosts();
     $post = reset($postList->posts);
     HeaderUtil::sendHeaders();
     echo $post->getFormattedMessage();
 }
 /**
  * @see Page::show()
  */
 public function show()
 {
     parent::show();
     HeaderUtil::sendHeaders();
     echo $this->post->message;
 }
 /**
  * Outputs a template.
  *
  * @param	string		$templateName
  * @param	boolean		$sendHeaders		if true, content type header is echoed
  */
 public function display($templateName, $sendHeaders = true)
 {
     if ($sendHeaders) {
         HeaderUtil::sendHeaders();
         // call shouldDisplay event
         if (!defined('NO_IMPORTS')) {
             EventHandler::fireAction($this, 'shouldDisplay');
         }
     }
     $compiledFilename = $this->getCompiledFilename($templateName);
     $sourceFilename = $this->getSourceFilename($templateName);
     // check if compilation is necessary
     if (!$this->isCompiled($sourceFilename, $compiledFilename)) {
         // compile
         $this->compileTemplate($templateName, $sourceFilename, $compiledFilename);
     }
     include $compiledFilename;
     if ($sendHeaders) {
         // call didDisplay event
         if (!defined('NO_IMPORTS')) {
             EventHandler::fireAction($this, 'didDisplay');
         }
     }
 }