/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->objectTypeID = intval($_REQUEST['id']); } // load object type $objectTypeDefinition = ObjectTypeCache::getInstance()->getDefinitionByName('com.woltlab.wcf.user.dashboardContainer'); $this->objectType = ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID); if ($this->objectType === null || $this->objectType->definitionID != $objectTypeDefinition->definitionID) { throw new IllegalLinkException(); } // load available boxes $allowedBoxTypes = array(); if ($this->objectType->allowcontent) { $allowedBoxTypes[] = 'content'; } if ($this->objectType->allowsidebar) { $allowedBoxTypes[] = 'sidebar'; } if (empty($allowedBoxTypes)) { // this should not happen unless you go full retard throw new IllegalLinkException(); } $boxList = new DashboardBoxList(); $boxList->getConditionBuilder()->add("dashboard_box.boxType IN (?)", array($allowedBoxTypes)); $boxList->readObjects(); $this->boxes = $boxList->getObjects(); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (WCF::getUser()->userID || WCF::getSession()->getVar('recaptchaDone')) { $this->useCaptcha = false; } }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (!empty($_REQUEST['url'])) { $this->url = $_REQUEST['url']; } }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (file_exists(WCF_DIR.'acp/masterPassword.inc.php')) { require_once(WCF_DIR.'acp/masterPassword.inc.php'); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->languageID = intval($_REQUEST['id']); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); $this->stylePackageImportLocation = WCF::getSession()->getVar('stylePackageImportLocation'); if ($this->stylePackageImportLocation) { $_POST['t'] = WCF::getSession()->getSecurityToken(); } }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id']) && !isset($_POST['username'])) { $this->userID = intval($_REQUEST['id']); $this->user[] = UserProfile::getUserProfile($this->userID); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // registration disabled if (!WCF::getUser()->userID && REGISTER_DISABLED) { throw new NamedUserException(WCF::getLanguage()->get('wcf.user.register.error.disabled')); } }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) $this->packageID = intval($_REQUEST['id']); $this->application = new ViewableApplication(new Application($this->packageID)); if (!$this->application->packageID) { throw new IllegalLinkException(); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_GET['u']) && !empty($_GET['u'])) { $this->userID = intval($_GET['u']); } if (isset($_GET['a']) && !empty($_GET['a'])) { $this->activationCode = intval($_GET['a']); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (file_exists(WCF_DIR . 'acp/masterPassword.inc.php')) { require_once WCF_DIR . 'acp/masterPassword.inc.php'; } else { HeaderUtil::redirect(LinkHandler::getInstance()->getLink('MasterPasswordInit')); exit; } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { AbstractForm::readParameters(); if (file_exists(WCF_DIR . 'acp/masterPassword.inc.php')) { require_once WCF_DIR . 'acp/masterPassword.inc.php'; if (defined('MASTER_PASSWORD')) { throw new IllegalLinkException(); } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->subscriptionID = intval($_REQUEST['id']); } $this->subscription = new PaidSubscription($this->subscriptionID); if (!$this->subscription->subscriptionID) { throw new PermissionDeniedException(); } }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get language editor object if (isset($_REQUEST['id'])) $this->languageID = intval($_REQUEST['id']); $language = LanguageFactory::getInstance()->getLanguage($this->languageID); if ($language === null) { throw new IllegalLinkException(); } $this->language = new LanguageEditor($language); }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) $this->styleID = intval($_REQUEST['id']); $this->style = new Style($this->styleID); if (!$this->style->styleID) { throw new IllegalLinkException(); } if ($this->style->imagePath && $this->style->imagePath != 'images/') $this->canExportImages = true; if ($this->style->templateGroupID) $this->canExportTemplates = true; }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get object type id $this->objectTypeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'); // get user $this->users = ClipboardHandler::getInstance()->getMarkedItems($this->objectTypeID); if (empty($this->users)) { throw new IllegalLinkException(); } $this->userIDs = array_keys($this->users); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (!empty($_REQUEST['copy'])) { $this->copy = intval($_REQUEST['copy']); $this->copiedTemplate = new Template($this->copy); if (!$this->copiedTemplate->templateID) { throw new IllegalLinkException(); } $this->application = $this->copiedTemplate->application; $this->packageID = $this->copiedTemplate->packageID; } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (!empty($_GET['u'])) { $userID = intval($_GET['u']); $this->user = new User($userID); if ($this->user->userID) { $this->username = $this->user->username; } } if (!empty($_GET['a'])) { $this->activationCode = intval($_GET['a']); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['u'])) { $this->userID = intval($_REQUEST['u']); } if (isset($_REQUEST['k'])) { $this->lostPasswordKey = StringUtil::trim($_REQUEST['k']); } // disable check for security token for GET requests if ($this->userID || $this->lostPasswordKey) { $_POST['t'] = WCF::getSession()->getSecurityToken(); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->queueID = intval($_REQUEST['id']); } $this->queue = ViewableModerationQueue::getViewableModerationQueue($this->queueID); if ($this->queue === null) { throw new IllegalLinkException(); } if (!$this->queue->canEdit()) { throw new PermissionDeniedException(); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { AbstractForm::readParameters(); if (isset($_REQUEST['id'])) { $this->bbcodeID = intval($_REQUEST['id']); } $this->bbcode = new BBCode($this->bbcodeID); if (!$this->bbcode->bbcodeID) { throw new IllegalLinkException(); } if (!in_array($this->bbcode->bbcodeTag, self::$nativeBBCodes)) { I18nHandler::getInstance()->register('buttonLabel'); } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->userGroupOptionID = intval($_REQUEST['id']); } $this->userGroupOption = new UserGroupOption($this->userGroupOptionID); if (!$this->userGroupOption) { throw new IllegalLinkException(); } // verify options and permissions for current option if ($this->verifyPermissions($this->userGroupOption)) { // read all categories $categoryList = new UserGroupOptionCategoryList(); $categoryList->readObjects(); $categories = array(); foreach ($categoryList as $category) { $categories[$category->categoryName] = $category; } // verify categories $category = $categories[$this->userGroupOption->categoryName]; while ($category != null) { if (!$this->verifyPermissions($category)) { throw new PermissionDeniedException(); } array_unshift($this->parentCategories, $category); $category = $category->parentCategoryName != '' ? $categories[$category->parentCategoryName] : null; } } else { throw new PermissionDeniedException(); } // read accessible groups $this->groups = UserGroup::getAccessibleGroups(); if ($this->userGroupOption->usersOnly) { $guestGroup = UserGroup::getGroupByType(UserGroup::GUESTS); if (isset($this->groups[$guestGroup->groupID])) { unset($this->groups[$guestGroup->groupID]); } } if (empty($this->groups)) { throw new PermissionDeniedException(); } // get option type $className = 'wcf\\system\\option\\user\\group\\' . ucfirst($this->userGroupOption->optionType) . 'UserGroupOptionType'; if (!class_exists($className)) { throw new SystemException("Unable to find option type for '" . $this->userGroupOption->optionType . "'"); } $this->optionType = new $className(); }
/** * @see wcf\form\IForm::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { $this->packageID = intval($_REQUEST['id']); if ($this->packageID != 0) { try { $this->package = new Package($this->packageID); } catch (SystemException $e) { throw new IllegalLinkException(); } } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['categoryID'])) { $this->categoryID = intval($_REQUEST['categoryID']); } if (isset($_REQUEST['id'])) { $this->pictureID = intval($_REQUEST['id']); } if ($this->pictureID) { $this->picture = new NewsPicture($this->pictureID); if (!$this->picture->pictureID) { throw new IllegalLinkException(); } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); $this->events = UserNotificationHandler::getInstance()->getAvailableEvents(); // filter events foreach ($this->events as $objectTypeID => $events) { foreach ($events as $eventName => $event) { if (!$event->isVisible()) { unset($this->events[$objectTypeID][$eventName]); } } if (empty($this->events[$objectTypeID])) { unset($this->events[$objectTypeID]); } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get object type id $this->objectTypeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'); if ($this->objectTypeID === null) { throw new SystemException("Unknown clipboard item type 'com.woltlab.wcf.user'"); } // get user ids $users = ClipboardHandler::getInstance()->getMarkedItems($this->objectTypeID); if (empty($users)) { throw new IllegalLinkException(); } // load users $this->userIDs = array_keys($users); $this->users = $users; }
/** * @see \wcf\page\AbstractPage::readParameters() */ public function readParameters() { parent::readParameters(); if (!empty($_REQUEST['category'])) { $this->category = $_REQUEST['category']; // validate category if (UserOptionCategory::getCategoryByName('settings.' . $this->category) === null) { throw new IllegalLinkException(); } } $this->optionHandler = new UserOptionHandler(false, '', 'settings.' . $this->category); $this->optionHandler->setUser(WCF::getUser()); if ($this->category == 'general') { $this->availableContentLanguages = LanguageFactory::getInstance()->getContentLanguages(); $this->availableLanguages = LanguageFactory::getInstance()->getLanguages(); $this->availableStyles = StyleHandler::getInstance()->getAvailableStyles(); } }
/** * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); I18nHandler::getInstance()->register('title'); I18nHandler::getInstance()->register('subTitle'); I18nHandler::getInstance()->register('description'); // get available styles $this->availableStyles = StyleHandler::getInstance()->getStyles(); $this->objectTypeID = ACLHandler::getInstance()->getObjectTypeID('info.codingcorner.ict.project'); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); I18nHandler::getInstance()->register('optionName'); I18nHandler::getInstance()->register('optionDescription'); // get available categories $categoryList = new UserOptionCategoryList(); $categoryList->getConditionBuilder()->add('parentCategoryName = ?', array('profile')); $categoryList->readObjects(); $this->availableCategories = $categoryList->getObjects(); }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); // get available exporters/importers $this->exporters = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.exporter'); // sort exporters by name uksort($this->exporters, function ($a, $b) { return strcasecmp(WCF::getLanguage()->get('wcf.acp.dataImport.exporter.' . $a), WCF::getLanguage()->get('wcf.acp.dataImport.exporter.' . $b)); }); $this->importers = array_keys(ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.importer')); if (isset($_REQUEST['exporterName'])) { $this->exporterName = $_REQUEST['exporterName']; if (!isset($this->exporters[$this->exporterName])) { throw new IllegalLinkException(); } $this->exporter = $this->exporters[$this->exporterName]->getProcessor(); $this->supportedData = $this->exporter->getSupportedData(); // remove unsupported data foreach ($this->supportedData as $key => $subData) { if (!in_array($key, $this->importers)) { unset($this->supportedData[$key]); continue; } foreach ($subData as $key2 => $value) { if (!in_array($value, $this->importers)) { unset($this->supportedData[$key][$key2]); } } } // get default database prefix if (!isset($_POST['dbPrefix'])) { $this->dbPrefix = $this->exporter->getDefaultDatabasePrefix(); } } }