/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (!WCF::getUser()->userID) { return; } // check max pc permission if (ConversationHandler::getInstance()->getConversationCount() >= WCF::getSession()->getPermission('user.conversation.maxConversations')) { throw new NamedUserException(WCF::getLanguage()->get('wcf.conversation.error.mailboxIsFull')); } if (isset($_REQUEST['userID'])) { $userID = intval($_REQUEST['userID']); $user = UserProfile::getUserProfile($userID); if ($user === null || $user->userID == WCF::getUser()->userID) { throw new IllegalLinkException(); } // validate user try { Conversation::validateParticipant($user); } catch (UserInputException $e) { throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.conversation.participants.error.' . $e->getType(), array('errorData' => array('username' => $user->username)))); } $this->participants = $user->username; } // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.conversation.maxLength'); // quotes MessageQuoteManager::getInstance()->readParameters(); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { MessageForm::readParameters(); if (isset($_REQUEST['categoryIDs']) && is_array($_REQUEST['categoryIDs'])) { $this->categoryIDs = ArrayUtil::toIntegerArray($_REQUEST['categoryIDs']); } // get the news by id if (isset($_REQUEST['id'])) { $this->entryID = intval($_REQUEST['id']); } $this->entry = new Entry($this->entryID); if (!$this->entry->entryID) { throw new IllegalLinkException(); } // check news permissions if (!$this->entry->canEdit()) { throw new PermissionDeniedException(); } // set attachment object id $this->attachmentObjectID = $this->entry->entryID; // polls if ($this->canCreatePoll()) { PollManager::getInstance()->setObject('de.incendium.cms.news.entry', $this->entry->entryID, $this->entry->pollID); } // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.news.maxTextLength'); }
public function readParameters() { parent::readParameters(); // polls if (MODULE_POLL & WCF::getSession()->getPermission('user.cms.news.canStartPoll')) { PollManager::getInstance()->setObject('de.codequake.cms.news', 0); } if (isset($_REQUEST['categoryIDs']) && is_array($_REQUEST['categoryIDs'])) { $this->categoryIDs = ArrayUtil::toIntegerArray($_REQUEST['categoryIDs']); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->entryID = intval($_REQUEST['id']); } $this->entry = new Entry($this->entryID); if (!$this->entry->entryID) { throw new IllegalLinkException(); } // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.filebase.maxTextLength'); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->newsID = intval($_REQUEST['id']); } $this->news = ViewableNews::getViewableNews($this->newsID); if ($this->news === null) { throw new IllegalLinkException(); } // check news permissions if (!$this->news->isEditable()) { throw new PermissionDeniedException(); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->entryID = intval($_REQUEST['id']); } $this->entry = new Entry($this->entryID); if ($this->entry === null) { throw new IllegalLinkException(); } // quotes MessageQuoteManager::getInstance()->readParameters(); // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.news.maxTextLength'); }
/** * @see \wcf\form\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->conversationID = intval($_REQUEST['id']); } $this->conversation = Conversation::getUserConversation($this->conversationID, WCF::getUser()->userID); if ($this->conversation === null) { throw new IllegalLinkException(); } if (!$this->conversation->canRead() || $this->conversation->isClosed) { throw new PermissionDeniedException(); } // quotes MessageQuoteManager::getInstance()->readParameters(); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { MessageForm::readParameters(); if (isset($_REQUEST['id'])) { $this->updateID = intval($_REQUEST['id']); } $this->update = new EntryUpdate($this->updateID); if (!$this->update->updateID) { throw new IllegalLinkException(); } $this->entryID = $this->update->entryID; $this->entry = new Entry($this->entryID); // check news permissions if (!$this->entry->canEdit()) { throw new PermissionDeniedException(); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { MessageForm::readParameters(); if (isset($_REQUEST['id'])) { $this->updateID = intval($_REQUEST['id']); } $this->update = new NewsUpdate($this->updateID); if (!$this->update->updateID) { throw new IllegalLinkException(); } $this->newsID = $this->update->newsID; $this->news = ViewableNews::getViewableNews($this->newsID); // check news permissions if (!$this->news->isEditable()) { throw new PermissionDeniedException(); } }
/** * @see \wcf\form\IPage::readParameters() */ public function readParameters() { MessageForm::readParameters(); if (isset($_REQUEST['id'])) { $this->messageID = intval($_REQUEST['id']); } $this->message = new ConversationMessage($this->messageID); if (!$this->message->messageID) { throw new IllegalLinkException(); } if (!$this->message->canEdit()) { throw new PermissionDeniedException(); } // get conversation $this->conversationID = $this->message->conversationID; $this->conversation = $this->message->getConversation(); if ($this->conversation->firstMessageID == $this->message->messageID) { $this->isFirstMessage = true; } // set attachment object id $this->attachmentObjectID = $this->message->messageID; }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['categoryIDs']) && is_array($_REQUEST['categoryIDs'])) { $this->categoryIDs = ArrayUtil::toIntegerArray($_REQUEST['categoryIDs']); } // quotes MessageQuoteManager::getInstance()->readParameters(); // poll if ($this->canCreatePoll()) { PollManager::getInstance()->setObject('de.voolia.news.entry', 0); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['categoryIDs']) && is_array($_REQUEST['categoryIDs'])) { $this->categoryIDs = ArrayUtil::toIntegerArray($_REQUEST['categoryIDs']); } // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.filebase.maxTextLength'); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.signature.maxLength'); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['categoryIDs']) && is_array($_REQUEST['categoryIDs'])) { $this->categoryIDs = ArrayUtil::toIntegerArray($_REQUEST['categoryIDs']); } // quotes MessageQuoteManager::getInstance()->readParameters(); // poll if ($this->canCreatePoll()) { PollManager::getInstance()->setObject('de.incendium.cms.news.entry', 0); } // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.news.maxTextLength'); }