/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // read sorting parameter if (isset($_REQUEST['sortField'])) $this->sortField = $_REQUEST['sortField']; if (isset($_REQUEST['sortOrder'])) $this->sortOrder = $_REQUEST['sortOrder']; }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get tag id if (isset($_REQUEST['id'])) { $this->tagID = intval($_REQUEST['id']); } $this->tag = new Tag($this->tagID); if (!$this->tag->tagID) { throw new IllegalLinkException(); } // filter taggable object types by options and permissions $this->availableObjectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.tagging.taggableObject'); foreach ($this->availableObjectTypes as $key => $objectType) { if ($objectType->options) { $hasEnabledOption = false; $options = explode(',', strtoupper($objectType->options)); foreach ($options as $option) { if (defined($option) && constant($option)) { $hasEnabledOption = true; break; } } if (!$hasEnabledOption) { unset($this->availableObjectTypes[$key]); } } if ($objectType->permissions) { $hasPermission = false; $permissions = explode(',', $objectType->permissions); foreach ($permissions as $permission) { if (WCF::getSession()->getPermission($permission)) { $hasPermission = true; break; } } if (!$hasPermission) { unset($this->availableObjectTypes[$key]); } } } if (empty($this->availableObjectTypes)) { throw new IllegalLinkException(); } // get object type if (isset($_REQUEST['objectType'])) { $objectType = StringUtil::trim($_REQUEST['objectType']); if (!isset($this->availableObjectTypes[$objectType])) { throw new IllegalLinkException(); } $this->objectType = $this->availableObjectTypes[$objectType]; } else { // use first object type $this->objectType = reset($this->availableObjectTypes); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['exceptionID'])) { $this->exceptionID = StringUtil::trim($_REQUEST['exceptionID']); } if (isset($_REQUEST['logFile'])) { $this->logFile = StringUtil::trim($_REQUEST['logFile']); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->categoryID = intval($_REQUEST['id']); $this->category = new Category($this->categoryID); if (!$this->category->categoryID) { throw new IllegalLinkException(); } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get object type if (isset($_REQUEST['objectType'])) { $this->objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.deletedContent', $_REQUEST['objectType']); } else { // use first object type $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.deletedContent'); if (!empty($objectTypes)) { $this->objectType = reset($objectTypes); } } if ($this->objectType === null) { throw new IllegalLinkException(); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['highlight'])) { $this->highlight = $_REQUEST['highlight']; } if (isset($_REQUEST['id'])) { $this->searchID = intval($_REQUEST['id']); } $this->search = new Search($this->searchID); if (!$this->search->searchID || $this->search->searchType != 'messages') { throw new IllegalLinkException(); } if ($this->search->userID && $this->search->userID != WCF::getUser()->userID) { throw new IllegalLinkException(); } // get search data $this->searchData = unserialize($this->search->searchData); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // letters if (isset($_REQUEST['letter']) && mb_strlen($_REQUEST['letter']) == 1 && mb_strpos(self::$availableLetters, $_REQUEST['letter']) !== false) { $this->letter = $_REQUEST['letter']; } // news by category if (isset($_REQUEST['id'])) { // get category id $this->categoryID = intval($_REQUEST['id']); // get category by id $this->category = CategoryHandler::getInstance()->getCategory($this->categoryID); // check category if ($this->category === null) { throw new IllegalLinkException(); } $this->category = new NewsCategory($this->category); if (!$this->category->isAccessible()) { throw new PermissionDeniedException(); } } else { if (isset($_REQUEST['userID'])) { $this->userID = intval($_REQUEST['userID']); $this->user = new User($this->userID); if (!$this->user->userID) { throw new IllegalLinkException(); } } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->conversationID = intval($_REQUEST['id']); } if (isset($_REQUEST['messageID'])) { $this->messageID = intval($_REQUEST['messageID']); } if ($this->messageID) { $this->message = new ConversationMessage($this->messageID); if (!$this->message->messageID) { throw new IllegalLinkException(); } $this->conversationID = $this->message->conversationID; } $this->conversation = Conversation::getUserConversation($this->conversationID, WCF::getUser()->userID); if ($this->conversation === null) { throw new IllegalLinkException(); } if (!$this->conversation->canRead()) { throw new PermissionDeniedException(); } // load labels $this->labelList = ConversationLabel::getLabelsByUser(); $this->conversation = ViewableConversation::getViewableConversation($this->conversation, $this->labelList); // posts per page if (WCF::getUser()->conversationMessagesPerPage) { $this->itemsPerPage = WCF::getUser()->conversationMessagesPerPage; } $this->canonicalURL = LinkHandler::getInstance()->getLink('Conversation', array('object' => $this->conversation), $this->pageNo ? 'pageNo=' . $this->pageNo : ''); }