/** * @see Page::readParameters() */ public function readParameters() { parent::readParameters(); if (!WCF::getUser()->getPermission('user.source.profiles.canManageProfiles')) { throw new PermissionDeniedException(); } if (isset($_POST['packages'])) { $packages = JSON::decode($_POST['packages']); if (!is_array($packages)) { $this->sendResponse('pb.build.profile.error.packages.empty', true); } $this->packages = $packages; } if (isset($_POST['packageHash'])) { $this->packageHash = StringUtil::trim($_POST['packageHash']); } if (isset($_POST['packageName'])) { $this->packageName = StringUtil::trim($_POST['packageName']); } if (isset($_POST['profileName'])) { $this->profileName = StringUtil::trim($_POST['profileName']); if (empty($this->profileName)) { $this->sendResponse('wcf.global.error.empty', true); } } if (isset($_POST['resource'])) { $this->resource = StringUtil::trim($_POST['resource']); } }
/** * @see AbstractSecureAction::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_GET['newsletterID'])) { $this->newsletterID = intval($_GET['newsletterID']); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_POST['packageName'])) { $this->packageName = StringUtil::trim($_POST['packageName']); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['hash'])) { $this->hash = StringUtil::trim($_REQUEST['hash']); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (!MODULE_MODERATED_USER_GROUP || !MODULE_PM) { throw new IllegalLinkException(); } if (isset($_POST['groupID'])) { $this->groupID = intval($_POST['groupID']); } $this->group = new Group($this->groupID); if (!$this->group->groupID) { throw new IllegalLinkException(); } // check permission if (!GroupApplicationEditor::isGroupLeader(WCF::getUser(), $this->groupID)) { throw new PermissionDeniedException(); } if (isset($_POST['subject'])) { $this->subject = StringUtil::trim($_POST['subject']); } if (isset($_POST['text'])) { $this->text = StringUtil::trim($_POST['text']); } if (empty($this->subject) || empty($this->text)) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_POST['applicationIDs'])) { $this->applicationIDs = ArrayUtil::toIntegerArray($_POST['applicationIDs']); } }
/** * @see AbstractSecureAction::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_GET['subscriberID'])) { $this->subscriberID = intval($_GET['subscriberID']); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); // get quote id if (isset($_POST['quoteID'])) { $this->quoteID = $_REQUEST['quoteID']; } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); // get board if (isset($_REQUEST['boardID'])) { $this->boardID = intval($_REQUEST['boardID']); } $this->board = new Board($this->boardID); $this->board->enter(); }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['ruleID'])) { $this->ruleID = intval($_REQUEST['ruleID']); } $this->rule = new PMRuleEditor($this->ruleID); if (!$this->rule->ruleID || !WCF::getUser()->userID || $this->rule->userID != WCF::getUser()->userID) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['entryID'])) { $this->entryID = intval($_REQUEST['entryID']); } $this->entry = new EntryEditor($this->entryID); if (!MODULE_CHEAT_DATABASE || !$this->entry->entryID) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['groupID'])) { $this->groupID = intval($_REQUEST['groupID']); } $this->group = new Group($this->groupID); if (!$this->group->groupID) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); // get object id if (isset($_REQUEST['objectID'])) { $this->objectID = intval($_REQUEST['objectID']); } // get object type if (isset($_POST['objectType'])) { $this->objectType = $_REQUEST['objectType']; } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['threadID'])) { $this->threadID = intval($_REQUEST['threadID']); } // get thread $this->thread = new ThreadEditor($this->threadID); // get board $this->board = Board::getBoard($this->thread->boardID); // enter thread $this->thread->enter($this->board); }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (!WCF::getUser()->getPermission('user.source.profiles.canUseProfiles')) { throw new PermissionDeniedException(); } if (isset($_POST['packageHash'])) { $this->packageHash = StringUtil::trim($_POST['packageHash']); } if (isset($_POST['packageName'])) { $this->packageName = StringUtil::trim($_POST['packageName']); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['participantID'])) { $this->participantID = intval($_REQUEST['participantID']); } $this->participant = new ContestParticipantEditor($this->participantID); if (!$this->participant->participantID) { throw new IllegalLinkException(); } if (!$this->participant->isDeletable()) { throw new PermissionDeniedException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (!WCF::getUser()->userID) { throw new IllegalLinkException(); } if (isset($_REQUEST['folderID'])) { $this->folderID = intval($_REQUEST['folderID']); } $this->folderList = new PMFolderList(); if (!isset($this->folderList->folders[$this->folderID])) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_POST['userIDs'])) { $this->userIDs = ArrayUtil::toIntegerArray($_POST['userIDs']); } if (isset($_POST['groupID'])) { $this->groupID = intval($_POST['groupID']); } $this->group = new Group($this->groupID); if (!$this->group->groupID) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_GET['fileID'])) { $this->fileID = intval($_GET['fileID']); } $this->sourceFile = new SourceFile($this->fileID); if (!$this->sourceFile->fileID) { throw new IllegalLinkException(); } if (!$this->sourceFile->canDownload()) { throw new PermissionDeniedException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['jurytalkID'])) { $this->jurytalkID = intval($_REQUEST['jurytalkID']); } $this->jurytalk = new ContestJurytalkEditor($this->jurytalkID); if (!$this->jurytalk->jurytalkID) { throw new IllegalLinkException(); } if (!$this->jurytalk->isDeletable()) { throw new PermissionDeniedException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (!MODULE_CONTEST) { throw new IllegalLinkException(); } $this->contestID = intval($_REQUEST['contestID']); if (isset($_REQUEST['contestAction'])) { $this->contestAction = $_REQUEST['contestAction']; } $this->contest = new Contest($this->contestID); if (!$this->contest->isViewable()) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); if (WCF::getUser()->avatarID) { $this->avatar = new AvatarEditor(WCF::getUser()->avatarID); $this->avatarType = $this->avatar->userID ? 'user' : 'selected'; } else { if (MODULE_GRAVATAR == 1 && WCF::getUser()->gravatar) { $this->avatar = new Gravatar(WCF::getUser()->gravatar); $this->avatarType = 'gravatar'; } } if (!WCF::getUser()->userID || WCF::getUser()->disableAvatar) { throw new PermissionDeniedException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); // check module if (MODULE_AVATAR != 1) { throw new IllegalLinkException(); } // check permission WCF::getUser()->checkPermission('admin.user.canEditUser'); // get user if (isset($_REQUEST['userID'])) { $this->userID = intval($_REQUEST['userID']); } $this->user = new UserEditor($this->userID); if (!$this->user->userID) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); try { // get post if (isset($_REQUEST['postID'])) { $this->postID = intval($_REQUEST['postID']); } $this->post = new PostEditor($this->postID); if (!$this->post->postID) { throw new IllegalLinkException(); } // get thread $this->thread = new ThreadEditor($this->post->threadID); $this->board = new BoardEditor($this->thread->boardID); $this->thread->enter($this->board); // check permissions $isModerator = $this->board->getModeratorPermission('canEditPost') || $this->board->getModeratorPermission('canDeletePost'); $isAuthor = $this->post->userID && $this->post->userID == WCF::getUser()->userID; $canEditPost = $this->board->getModeratorPermission('canEditPost') || $isAuthor && $this->board->getPermission('canEditOwnPost'); if (!$canEditPost || !$isModerator && ($this->board->isClosed || $this->thread->isClosed || $this->post->isClosed)) { throw new PermissionDeniedException(); } // check post edit timeout if (!$isModerator && WCF::getUser()->getPermission('user.board.postEditTimeout') != -1 && TIME_NOW - $this->post->time > WCF::getUser()->getPermission('user.board.postEditTimeout') * 60) { throw new NamedUserException(WCF::getLanguage()->get('wbb.postEdit.error.timeout', array('$timeout' => WCF::getUser()->getPermission('user.board.postEditTimeout')))); } // get message if (isset($_POST['text'])) { $this->text = StringUtil::trim($_POST['text']); if (CHARSET != 'UTF-8') { $this->text = StringUtil::convertEncoding('UTF-8', CHARSET, $this->text); } if (empty($this->text)) { throw new IllegalLinkException(); } } } catch (UserException $e) { @header('HTTP/1.0 403 Forbidden'); echo $e->getMessage(); exit; } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); require_once WCF_DIR . 'lib/data/contest/price/ContestPrice.class.php'; if (!MODULE_CONTEST) { throw new IllegalLinkException(); } $this->priceID = intval($_REQUEST['priceID']); $this->participantID = intval($_REQUEST['participantID']); if (isset($_REQUEST['interestID'])) { $this->interestID = $_REQUEST['interestID']; } if (isset($_REQUEST['contestAction'])) { $this->contestAction = $_REQUEST['contestAction']; } $this->contest = new Contest($this->priceID); if (!$this->contest->isViewable()) { throw new IllegalLinkException(); } }
/** * @see Action::readParameters() */ public function readParameters() { parent::readParameters(); // get object id if (isset($_REQUEST['objectID'])) { $this->objectID = intval($_REQUEST['objectID']); } // get quote(s) if (isset($_REQUEST['text'])) { $this->text = $_REQUEST['text']; } if (is_array($this->text)) { $this->text = ArrayUtil::unifyNewlines(ArrayUtil::trim($this->text)); if (CHARSET != 'UTF-8') { $this->text = ArrayUtil::convertEncoding('UTF-8', CHARSET, $this->text); } } else { $this->text = StringUtil::unifyNewlines(StringUtil::trim($this->text)); if (CHARSET != 'UTF-8') { $this->text = StringUtil::convertEncoding('UTF-8', CHARSET, $this->text); } } }