/** * @see Page::readData() */ public function readData() { MessageForm::readData(); // read variables from object $this->subject = $this->item->subject; $this->text = $this->item->text; $this->enableSmilies = $this->item->enableSmilies; $this->enableHtml = $this->item->enableHtml; $this->enableBBCodes = $this->item->enableBBCodes; }
public function readData() { parent::readData(); if ($this->server == null) { $this->server = new Server($this->serverID); } if (!$this->server->serverID) { throw new IllegalLinkException(); } }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST)) { // default settings // wysiwyg $this->wysiwygEditorMode = WCF::getUser()->wysiwygEditorMode; $this->wysiwygEditorHeight = WCF::getUser()->wysiwygEditorHeight; // options $this->parseURL = WCF::getUser()->{$this->permissionType . 'ParseURL'}; $this->enableSmilies = WCF::getUser()->{$this->permissionType . 'EnableSmilies'}; $this->enableHtml = WCF::getUser()->{$this->permissionType . 'EnableHtml'}; $this->enableBBCodes = WCF::getUser()->{$this->permissionType . 'EnableBBCodes'}; } }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST) && $this->entryID == 0) { $this->username = WCF::getSession()->username; } }
/** * @see Page::readData() */ public function readData() { parent::readData(); $this->states = $this->getStates(); // owner $prefix = 'g'; $this->ownerGroups = ContestUtil::readAvailableGroups($prefix); // admin permissions $this->ownerSponsors = array(); if ($this->contest->isOwner() || ContestCrew::isMember()) { $groupIDs = ContestUtil::readAvailableGroups(); $groupIDs = array_keys($groupIDs); foreach ($this->contest->getSponsors() as $sponsor) { if (!in_array($sponsor->groupID, $groupIDs) && $sponsor->isOwner() == false) { $this->ownerSponsors[$sponsor->sponsorID] = $sponsor; } } } }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST)) { // default values $this->username = WCF::getSession()->username; if (!$this->subscription && WCF::getUser()->enableSubscription) { $this->subscription = 1; } } $this->boardOptions = Board::getBoardSelect(array('canViewBoard'), true, true); }
/** * @see Page::readData() */ public function readData() { parent::readData(); $this->states = $this->getStates(); $this->availableGroups = ContestUtil::readAvailableGroups(); // init sidebar $this->sidebar = new ContestSidebar($this->contest); }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST)) { // default values // user if ($this->userID) { $user = new User($this->userID); $this->recipients = $user->username; } // existing message if ($this->pm) { if ($this->forwarding) { $data = array('$author' => $this->pm->username ? $this->pm->username : WCF::getLanguage()->get('wcf.pm.author.system'), '$date' => DateUtil::formatTime(null, $this->pm->time), '$recipients' => implode(', ', $this->pm->getRecipients()), '$subject' => $this->pm->subject, '$text' => $this->pm->message); $this->subject = WCF::getLanguage()->get('wcf.pm.forward.subject', array('$subject' => $this->pm->subject)); $this->text = WCF::getLanguage()->get('wcf.pm.forward.text', $data); } else { if ($this->reply) { $this->subject = WCF::getLanguage()->get('wcf.pm.reply.subject', array('$subject' => $this->pm->subject)); // replace RE: RE: RE: by RE[3]: $this->subject = preg_replace('/(^RE: RE\\[)(\\d+)(?=\\]:)/ie', '"RE[".(\\2+1)', $this->subject); $this->subject = preg_replace('/^(RE: RE:(?: RE:)+)/ie', '"RE[".substr_count("\\1", "RE:")."]:"', $this->subject); if ($this->replyToAll == 1) { $recipients = array(); foreach ($this->pm->getRecipients() as $recipient) { $recipients[] = $recipient->recipient; } $recipients[] = $this->pm->username; $recipients = array_unique($recipients); foreach ($recipients as $key => $value) { if (StringUtil::toLowerCase($value) == StringUtil::toLowerCase(WCF::getUser()->username)) { unset($recipients[$key]); break; } } $this->recipients = implode(', ', $recipients); } else { $this->recipients = $this->pm->username; } } else { // edit draft $sql = "SELECT\t\trecipient, isBlindCopy\n\t\t\t\t\t\tFROM\t\twcf" . WCF_N . "_pm_to_user\n\t\t\t\t\t\tWHERE\t\tpmID = " . $this->pm->pmID . "\n\t\t\t\t\t\tORDER BY\trecipient"; $result = WCF::getDB()->sendQuery($sql); while ($row = WCF::getDB()->fetchArray($result)) { if ($row['isBlindCopy']) { if (!empty($this->blindCopies)) { $this->blindCopies .= ', '; } $this->blindCopies .= $row['recipient']; } else { if (!empty($this->recipients)) { $this->recipients .= ', '; } $this->recipients .= $row['recipient']; } } $this->subject = $this->pm->subject; $this->text = $this->pm->message; // options $this->enableSmilies = $this->pm->enableSmilies; $this->enableHtml = $this->pm->enableHtml; $this->enableBBCodes = $this->pm->enableBBCodes; $this->showSignature = $this->pm->showSignature; } } } } if ($this->reply) { require_once WCF_DIR . 'lib/data/message/pm/PMList.class.php'; $this->pmList = new PMList($this->pm); $this->pmList->sqlLimit = 10; $this->pmList->readObjects(); } }
/** * @see Page::readData() */ public function readData() { parent::readData(); $this->serverList = Server::getServerList(); }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST)) { $this->authorname = WCF::getSession()->username; } }
/** * @see Page::readData() */ public function readData() { parent::readData(); }
/** * @see Page::readData() */ public function readData() { parent::readData(); if (!count($_POST)) { // wysiwyg $this->wysiwygEditorMode = WCF::getUser()->wysiwygEditorMode; $this->wysiwygEditorHeight = WCF::getUser()->wysiwygEditorHeight; // default settings $this->parseURL = 1; $this->enableSmilies = $this->user->enableWantedPosterSmilies; $this->enableHtml = $this->user->enableWantedPosterHtml; $this->enableBBCodes = $this->user->enableWantedPosterBBCodes; } }
/** * @see Page::readData() */ public function readData() { parent::readData(); $this->availableClasses = ContestClass::getClasses(); // get classes $this->classList = new ContestClassTree(); $this->classList->readObjects(); $this->availableGroups = ContestUtil::readAvailableGroups(); // default values if (!count($_POST)) { $this->classIDArray = array_keys($this->availableClasses); } }
/** * @see Page::assignVariables() */ public function readData() { parent::readData(); if (!count($_POST)) { // default settings $this->parseURL = 1; $this->enableSmilies = WCF::getUser()->enableSignatureSmilies; $this->enableHtml = WCF::getUser()->enableSignatureHtml; $this->enableBBCodes = WCF::getUser()->enableSignatureBBCodes; } }
/** * @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(); }