/** * @see Page::readData() */ public function readData() { parent::readData(); // get post list $this->postList = new PostAddPostList($this->thread, $this->board); // old thread warning if (REPLY_OLD_THREAD_WARNING && $this->thread->lastPostTime > 0) { $this->oldThreadWarning = intval(floor((TIME_NOW - $this->thread->lastPostTime) / 86400)); if ($this->oldThreadWarning < REPLY_OLD_THREAD_WARNING) { $this->oldThreadWarning = 0; } } $this->attachments = $this->postList->attachments; if (count($this->attachments) > 0) { require_once WCF_DIR . 'lib/data/attachment/MessageAttachmentList.class.php'; MessageAttachmentList::removeEmbeddedAttachments($this->attachments); } // default values if (!count($_POST)) { $this->closeThread = $this->thread->isClosed; $this->subscription = $this->thread->subscribed; if (!$this->subscription && WCF::getUser()->enableSubscription) { $this->subscription = 1; } // single quote if ($this->action == 'quote') { $post = $this->thread->getPost(); if ($post) { $this->text = "[quote='" . StringUtil::replace("'", "\\'", $post->username) . "',index.php?page=Thread&postID=" . $post->postID . "#post" . $post->postID . "]" . $post->message . "[/quote]"; if ($post->subject) { $this->subject = WCF::getLanguage()->get('wbb.postAdd.quote.subject', array('$subject' => $post->subject)); } } } } }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST)) { $this->closeThread = $this->thread->isClosed; $this->text = $this->post->message; $this->subject = $this->post->subject; $this->subscription = $this->thread->subscribed; $this->prefix = $this->thread->prefix; if ($this->thread->isSticky) { $this->isImportant = 1; } if ($this->thread->isAnnouncement) { $this->isImportant = 2; } $this->boardIDs = $this->thread->getAssignedBoards(); $this->languageID = $this->thread->languageID; $this->editReason = $this->post->editReason; $this->enableSmilies = $this->post->enableSmilies; $this->enableHtml = $this->post->enableHtml; $this->enableBBCodes = $this->post->enableBBCodes; $this->showSignature = $this->post->showSignature; // tags if (THREAD_ENABLE_TAGS && $this->thread->firstPostID == $this->postID) { $this->tags = TaggingUtil::buildString($this->thread->getTags(array($this->languageID))); } } // get post list if ($this->thread->firstPostID != $this->postID) { try { require_once WBB_DIR . 'lib/data/post/PostEditPostList.class.php'; $this->postList = new PostEditPostList($this->post, $this->thread, $this->board); $this->attachments = $this->postList->attachments; if (count($this->attachments) > 0) { require_once WCF_DIR . 'lib/data/attachment/MessageAttachmentList.class.php'; MessageAttachmentList::removeEmbeddedAttachments($this->attachments); } } catch (SystemException $e) { } } }