/** * @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) { } } }
/** * @see Page::readData() */ public function readData() { parent::readData(); // default values if (!count($_POST)) { $this->subject = $this->entry->subject; $this->text = $this->entry->message; $this->enableSmilies = $this->entry->enableSmilies; $this->enableHtml = $this->entry->enableHtml; $this->enableBBCodes = $this->entry->enableBBCodes; $this->enableSolution = $this->entry->enableSolution; $this->enableOpenSolution = $this->entry->enableOpenSolution; $this->enableParticipantCheck = $this->entry->enableParticipantCheck; $this->enablePricechoice = $this->entry->enablePricechoice; $this->priceExpireSeconds = $this->entry->priceExpireSeconds; $this->enableSponsorCheck = $this->entry->enableSponsorCheck; $this->userID = $this->entry->userID; $this->groupID = $this->entry->groupID; $this->state = $this->entry->state; $this->isFullDay = $this->entry->isFullDay; $this->fromTime = $this->entry->fromTime; $this->untilTime = $this->entry->untilTime; $this->classIDArray = array_keys($this->entry->getClasses()); if ($this->groupID > 0) { $this->ownerID = $this->groupID; } // tags if (MODULE_TAGGING) { $this->tags = TaggingUtil::buildString($this->entry->getTags(array(count(Language::getAvailableContentLanguages()) > 0 ? WCF::getLanguage()->getLanguageID() : 0))); } } $from = $this->fromTime == 0 ? time() : $this->fromTime; $until = $this->untilTime == 0 ? time() : $this->untilTime; $this->eventDate = new ContestDate(array('isFullDay' => $this->isFullDay, 'fromDay' => date('d', $from), 'fromMonth' => date('m', $from), 'fromYear' => date('Y', $from), 'fromHour' => date('h', $from), 'fromMinute' => date('i', $from), 'untilDay' => date('d', $until), 'untilMonth' => date('m', $until), 'untilYear' => date('Y', $until), 'untilHour' => date('h', $until), 'untilMinute' => date('i', $until))); // get classes $this->classList = new ContestClassTree(); $this->classList->readObjects(); $this->availableClasses = ContestClass::getClasses(); $this->states = $this->getStates(); $this->availableGroups = ContestUtil::readAvailableGroups(); }