/** * @see \wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['points']) && is_array($_POST['points'])) { $this->points = ArrayUtil::toIntegerArray($_POST['points']); } }
/** * @see \wcf\system\option\IOptionType::getData() */ public function getData(Option $option, $newValue) { if (!is_array($newValue)) { $newValue = array(); } return implode("\n", ArrayUtil::toIntegerArray($newValue)); }
/** * @see \wcf\system\search\ISearchableObjectType::getConditions() */ public function getConditions(IForm $form = null) { $conditionBuilder = new PreparedStatementConditionBuilder(); // accessible category ids if (isset($_POST['filebaseCategoryIDs'])) { $this->filebaseCategoryIDs = ArrayUtil::toIntegerArray($_POST['filebaseCategoryIDs']); } $categoryIDs = FilebaseCategory::getAccessibleCategoryIDs(); if (!empty($this->filebaseCategoryIDs)) { $this->filebaseCategoryIDs = array_intersect($categoryIDs, $this->filebaseCategoryIDs); } else { $this->filebaseCategoryIDs = $categoryIDs; } if (empty($this->filebaseCategoryIDs)) { throw new PermissionDeniedException(); } $conditionBuilder->add($this->getTableName() . '.entryID IN (SELECT entryID FROM filebase' . WCF_N . '_entry_to_category WHERE categoryID IN (?))', array($this->filebaseCategoryIDs)); // default conditions $conditionBuilder->add($this->getTableName() . '.isDisabled = 0'); $conditionBuilder->add($this->getTableName() . '.isDeleted = 0'); // language if (FILEBASE_ENABLE_MULTILINGUALISM && LanguageFactory::getInstance()->multilingualismEnabled() && count(WCF::getUser()->getLanguageIDs())) { $conditionBuilder->add('(' . $this->getTableName() . '.languageID IN (?) OR ' . $this->getTableName() . '.languageID IS NULL)', array(WCF::getUser()->getLanguageIDs())); } return $conditionBuilder; }
/** * @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'); }
/** * @see \wcf\system\option\IOptionType::getData() */ public function getData(Option $option, $newValue) { if (!is_array($newValue)) { $newValue = array(); } $newValue = ArrayUtil::toIntegerArray($newValue); sort($newValue, SORT_NUMERIC); return implode(',', $newValue); }
/** * @see wcf\action\Action::readParameters() */ public function readParameters() { AbstractSecureAction::readParameters(); if (isset($_POST['action'])) $this->action = StringUtil::trim($_POST['action']); if (isset($_POST['containerData']) && is_array($_POST['containerData'])) $this->containerData = $_POST['containerData']; if (isset($_POST['objectIDs']) && is_array($_POST['objectIDs'])) $this->objectIDs = ArrayUtil::toIntegerArray($_POST['objectIDs']); if (isset($_POST['pageClassName'])) $this->pageClassName = StringUtil::trim($_POST['pageClassName']); if (isset($_POST['type'])) $this->type = StringUtil::trim($_POST['type']); }
/** * @see \wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['enable'])) { $this->enable = intval($_POST['enable']); } if (isset($_POST['languageIDs']) && is_array($_POST['languageIDs'])) { $this->languageIDs = ArrayUtil::toIntegerArray($_POST['languageIDs']); } }
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\system\option\IOptionType::validate() */ public function validate(Option $option, $newValue) { if (!is_array($newValue)) { $newValue = array(); } $newValue = ArrayUtil::toIntegerArray($newValue); foreach ($newValue as $pageID) { if (PageCache::getInstance()->getPage($pageID) === null) { throw new UserInputException($option->optionName, 'validationFailed'); } } }
/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['id'])) { if (is_array($_REQUEST['id'])) { // ?id[]=1337&id[]=9001 $this->objectIDs = ArrayUtil::toIntegerArray($_REQUEST['id']); } else { // ?id=1337 or ?id=1337,9001 $this->objectIDs = ArrayUtil::toIntegerArray(explode(',', $_REQUEST['id'])); } } }
/** * @see \wcf\action\IAction::readParameters() */ public function readParameters() { parent::readParameters(); if (isset($_POST['interfaceName'])) { $this->interfaceName = StringUtil::trim($_POST['interfaceName']); } if (isset($_POST['objectIDs']) && is_array($_POST['objectIDs'])) { $this->objectIDs = ArrayUtil::toIntegerArray($_POST['objectIDs']); } if (isset($_POST['parameters']) && is_array($_POST['parameters'])) { $this->parameters = $_POST['parameters']; } }
/** * @see \wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['selectedPackages']) && is_array($_POST['selectedPackages'])) { $selectedPackages = ArrayUtil::toIntegerArray($_POST['selectedPackages']); $this->selectedPackages = array_combine($selectedPackages, $selectedPackages); if (isset($this->selectedPackages[0])) { unset($this->selectedPackages[0]); } } if (isset($_POST['exportCustomValues'])) { $this->exportCustomValues = intval($_POST['exportCustomValues']); } if (isset($_POST['languageID'])) { $this->languageID = intval($_POST['languageID']); } }
/** * @see \wcf\system\message\embedded\object\IMessageEmbeddedObjectHandler::parseMessage() */ public function parseMessage($message) { $parsedAttachmentIDs = array_unique(ArrayUtil::toIntegerArray(array_merge(self::getFirstParameters($message, 'attach'), self::getTextParameters($message, 'attach')))); if (!empty($parsedAttachmentIDs)) { $attachmentIDs = array(); foreach ($parsedAttachmentIDs as $parsedAttachmentID) { if ($parsedAttachmentID) { $attachmentIDs[] = $parsedAttachmentID; } } if (!empty($attachmentIDs)) { $attachmentList = new AttachmentList(); $attachmentList->getConditionBuilder()->add("attachment.attachmentID IN (?)", array($attachmentIDs)); $attachmentList->readObjectIDs(); return $attachmentList->getObjectIDs(); } } return false; }
/** * @see \wcf\data\ISortableAction::validateUpdatePosition() */ public function validateUpdatePosition() { // validate permissions WCF::getSession()->checkPermissions(array('admin.content.dashboard.canEditDashboard')); $this->readString('boxType'); $this->readInteger('objectTypeID'); // validate box type if (!in_array($this->parameters['boxType'], array('content', 'sidebar'))) { throw new UserInputException('boxType'); } // validate object type $objectType = ObjectTypeCache::getInstance()->getObjectType($this->parameters['objectTypeID']); if ($objectType !== null) { $objectTypeDefinition = ObjectTypeCache::getInstance()->getDefinitionByName('com.woltlab.wcf.user.dashboardContainer'); if ($objectTypeDefinition !== null) { if ($objectType->definitionID == $objectTypeDefinition->definitionID) { $this->objectType = $objectType; } } } if ($this->objectType === null) { throw new UserInputException('objectTypeID'); } // read all dashboard boxes of the relevant box type $boxList = new DashboardBoxList(); $boxList->getConditionBuilder()->add("dashboard_box.boxType = ?", array($this->parameters['boxType'])); $boxList->readObjects(); $this->boxes = $boxList->getObjects(); // parse structure if (isset($this->parameters['data']) & isset($this->parameters['data']['structure']) && isset($this->parameters['data']['structure'][0])) { $this->boxStructure = ArrayUtil::toIntegerArray($this->parameters['data']['structure'][0]); // validate box ids if (!empty($this->boxStructure)) { foreach ($this->boxStructure as $boxID) { if (!isset($this->boxes[$boxID])) { throw new UserInputException('boxID'); } } } } }
/** * @see \wcf\system\message\embedded\object\IMessageEmbeddedObjectHandler::parseMessage() */ public function parseMessage($message) { // yes i know... but what i can do diffrent to the parent class? ;) I am only need xattach... Stupid! $return = false; $parsedIDs = array_unique(ArrayUtil::toIntegerArray(self::getFirstParameters($message, 'xattach'))); if (!empty($parsedIDs)) { $attachmentIDs = array(); foreach ($parsedIDs as $attachmentID) { if ($attachmentID) { $attachmentIDs[] = $attachmentID; } } if (!empty($attachmentIDs)) { $attachmentList = new AttachmentList(); $attachmentList->getConditionBuilder()->add("attachment.attachmentID IN (?)", array($attachmentIDs)); $attachmentList->readObjectIDs(); $return = $attachmentList->getObjectIDs(); } } return $return; }
/** * @see wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['userIDs'])) { $this->userIDs = ArrayUtil::toIntegerArray(explode(',', $_POST['userIDs'])); } if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) { $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); } if (isset($_POST['subject'])) { $this->subject = StringUtil::trim($_POST['subject']); } if (isset($_POST['text'])) { $this->text = StringUtil::trim($_POST['text']); } if (isset($_POST['from'])) { $this->from = StringUtil::trim($_POST['from']); } if (isset($_POST['enableHTML'])) { $this->enableHTML = intval($_POST['enableHTML']); } }
/** * @see \wcf\form\AbstractForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); $this->optionHandler->readUserInput($_POST); // static options if ($this->category == 'general') { if (isset($_POST['contentLanguageIDs']) && is_array($_POST['contentLanguageIDs'])) { $this->contentLanguageIDs = ArrayUtil::toIntegerArray($_POST['contentLanguageIDs']); } if (isset($_POST['languageID'])) { $this->languageID = intval($_POST['languageID']); } if (isset($_POST['styleID'])) { $this->styleID = intval($_POST['styleID']); } } }
/** * @see \wcf\system\condition\ICondition::readFormParameters() */ public function readFormParameters() { if (isset($_POST[$this->fieldName]) && is_array($_POST[$this->fieldName])) { $this->fieldValue = ArrayUtil::toIntegerArray($_POST[$this->fieldName]); } }
/** * @see \wcf\action\IAction::readParameters() */ public function readParameters() { if (!MODULE_POLL) { throw new IllegalLinkException(); } AbstractSecureAction::readParameters(); if (isset($_POST['actionName'])) { $this->actionName = StringUtil::trim($_POST['actionName']); } if (isset($_POST['pollID'])) { $this->pollID = intval($_POST['pollID']); } $polls = PollManager::getInstance()->getPolls(array($this->pollID)); if (!isset($polls[$this->pollID])) { throw new UserInputException('pollID'); } $this->poll = $polls[$this->pollID]; // load related object $this->relatedObject = PollManager::getInstance()->getRelatedObject($this->poll); if ($this->relatedObject === null) { if ($this->poll->objectID) { throw new SystemException("Missing related object for poll id '" . $this->poll->pollID . "'"); } } else { $this->poll->setRelatedObject($this->relatedObject); } // validate action switch ($this->actionName) { case 'getResult': if (!$this->poll->canSeeResult()) { throw new PermissionDeniedException(); } break; case 'getVote': case 'vote': if (!$this->poll->canVote()) { throw new PermissionDeniedException(); } break; default: throw new SystemException("Unknown action '" . $this->actionName . "'"); break; } if (isset($_POST['optionIDs']) && is_array($_POST['optionIDs'])) { $this->optionIDs = ArrayUtil::toIntegerArray($_POST['optionIDs']); if (count($this->optionIDs) > $this->poll->maxVotes) { throw new PermissionDeniedException(); } $optionIDs = array(); foreach ($this->poll->getOptions() as $option) { $optionIDs[] = $option->optionID; } foreach ($this->optionIDs as $optionID) { if (!in_array($optionID, $optionIDs)) { throw new PermissionDeniedException(); } } } }
/** * @see \wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); I18nHandler::getInstance()->readValues(); // general data if (I18nHandler::getInstance()->isPlainValue('title')) { $this->title = StringUtil::trim(I18nHandler::getInstance()->getValue('title')); } if (isset($_POST['alias'])) { $this->alias = StringUtil::trim($_POST['alias']); } if (I18nHandler::getInstance()->isPlainValue('description')) { $this->description = StringUtil::trim(I18nHandler::getInstance()->getValue('description')); } $this->createMenuItem = isset($_POST['createMenuItem']) ? 1 : 0; // meta information if (I18nHandler::getInstance()->isPlainValue('metaDescription')) { $this->metaDescription = StringUtil::trim(I18nHandler::getInstance()->getValue('metaDescription')); } if (I18nHandler::getInstance()->isPlainValue('metaKeywords')) { $this->metaKeywords = StringUtil::trim(I18nHandler::getInstance()->getValue('metaKeywords')); } $this->allowIndexing = isset($_POST['allowIndexing']) ? 1 : 0; // position if (isset($_POST['showOrder'])) { $this->showOrder = intval($_POST['showOrder']); } if (isset($_POST['invisible'])) { $this->invisible = intval($_POST['invisible']); } // publication if (isset($_POST['enableDelayedPublication'])) { $this->enableDelayedPublication = intval($_POST['enableDelayedPublication']); } if (isset($_POST['publicationDate'])) { $this->publicationDate = $_POST['publicationDate']; } if (isset($_POST['enableDelayedDeactivation'])) { $this->enableDelayedDeactivation = intval($_POST['enableDelayedDeactivation']); } if (isset($_POST['deactivationDate'])) { $this->deactivationDate = $_POST['deactivationDate']; } // settings if (isset($_POST['menuItemID'])) { $this->menuItemID = intval($_POST['menuItemID']); } $this->isCommentable = isset($_POST['isCommentable']) ? 1 : 0; $this->availableDuringOfflineMode = isset($_POST['availableDuringOfflineMode']) ? 1 : 0; $this->allowSubscribing = isset($_POST['allowSubscribing']) ? 1 : 0; // display if (isset($_POST['styleID'])) { $this->styleID = intval($_POST['styleID']); } if (isset($_POST['stylesheetIDs']) && is_array($_POST['stylesheetIDs'])) { $this->stylesheetIDs = ArrayUtil::toIntegerArray($_POST['stylesheetIDs']); } // display settings if (isset($_POST['sidebarOrientation'])) { $this->sidebarOrientation = StringUtil::trim($_POST['sidebarOrientation']); } }
/** * @see wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); $this->ignoreUniques = $this->plugin = $this->isApplication = 0; if (isset($_POST['packageUpdateServerIDs']) && is_array($_POST['packageUpdateServerIDs'])) { $this->packageUpdateServerIDs = ArrayUtil::toIntegerArray($_POST['packageUpdateServerIDs']); } if (isset($_POST['packageName'])) { $this->packageName = StringUtil::trim($_POST['packageName']); } if (isset($_POST['author'])) { $this->author = StringUtil::trim($_POST['author']); } if (isset($_POST['searchDescription'])) { $this->searchDescription = intval($_POST['searchDescription']); } if (isset($_POST['plugin'])) { $this->plugin = intval($_POST['plugin']); } if (isset($_POST['isApplication'])) { $this->isApplication = intval($_POST['isApplication']); } if (isset($_POST['other'])) { $this->other = intval($_POST['other']); } if (isset($_POST['ignoreUniques'])) { $this->ignoreUniques = intval($_POST['ignoreUniques']); } }
/** * @see wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['username'])) $this->username = StringUtil::trim($_POST['username']); if (isset($_POST['email'])) $this->email = StringUtil::trim($_POST['email']); if (isset($_POST['confirmEmail'])) $this->confirmEmail = StringUtil::trim($_POST['confirmEmail']); if (isset($_POST['password'])) $this->password = $_POST['password']; if (isset($_POST['confirmPassword'])) $this->confirmPassword = $_POST['confirmPassword']; if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); if (isset($_POST['visibleLanguages']) && is_array($_POST['visibleLanguages'])) $this->visibleLanguages = ArrayUtil::toIntegerArray($_POST['visibleLanguages']); if (isset($_POST['languageID'])) $this->languageID = intval($_POST['languageID']); }
/** * @see \wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); // read i18n values I18nHandler::getInstance()->readValues(); // handle i18n plain input if (I18nHandler::getInstance()->isPlainValue('description')) { $this->description = I18nHandler::getInstance()->getValue('description'); } if (I18nHandler::getInstance()->isPlainValue('title')) { $this->title = I18nHandler::getInstance()->getValue('title'); } if (!empty($_POST['isDisabled'])) { $this->isDisabled = 1; } if (isset($_POST['showOrder'])) { $this->showOrder = intval($_POST['showOrder']); } if (isset($_POST['cost'])) { $this->cost = floatval($_POST['cost']); } if (isset($_POST['currency'])) { $this->currency = $_POST['currency']; } if (!empty($_POST['subscriptionLengthPermanent'])) { $this->subscriptionLengthPermanent = 1; } if (isset($_POST['subscriptionLength'])) { $this->subscriptionLength = intval($_POST['subscriptionLength']); } if (isset($_POST['subscriptionLengthUnit'])) { $this->subscriptionLengthUnit = $_POST['subscriptionLengthUnit']; } if (!empty($_POST['isRecurring'])) { $this->isRecurring = 1; } if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) { $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); } }
/** * @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\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['username'])) { $this->username = StringUtil::trim($_POST['username']); } if (isset($_POST['email'])) { $this->email = StringUtil::trim($_POST['email']); } if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) { $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); } if (isset($_POST['languageIDs']) && is_array($_POST['languageIDs'])) { $this->languageIDs = ArrayUtil::toIntegerArray($_POST['languageIDs']); } if (isset($_POST['invertGroupIDs'])) { $this->invertGroupIDs = intval($_POST['invertGroupIDs']); } if (isset($_POST['registrationDateStart'])) { $this->registrationDateStart = $_POST['registrationDateStart']; } if (isset($_POST['registrationDateEnd'])) { $this->registrationDateEnd = $_POST['registrationDateEnd']; } if (isset($_POST['banned'])) { $this->banned = intval($_POST['banned']); } if (isset($_POST['notBanned'])) { $this->notBanned = intval($_POST['notBanned']); } if (isset($_POST['lastActivityTimeStart'])) { $this->lastActivityTimeStart = $_POST['lastActivityTimeStart']; } if (isset($_POST['lastActivityTimeEnd'])) { $this->lastActivityTimeEnd = $_POST['lastActivityTimeEnd']; } if (isset($_POST['enabled'])) { $this->enabled = intval($_POST['enabled']); } if (isset($_POST['disabled'])) { $this->disabled = intval($_POST['disabled']); } // assign to group if (isset($_POST['assignToGroupIDs']) && is_array($_POST['assignToGroupIDs'])) { $this->assignToGroupIDs = ArrayUtil::toIntegerArray($_POST['assignToGroupIDs']); } // export mail address if (isset($_POST['fileType']) && $_POST['fileType'] == 'xml') { $this->fileType = $_POST['fileType']; } if (isset($_POST['separator'])) { $this->separator = $_POST['separator']; } if (isset($_POST['textSeparator'])) { $this->textSeparator = $_POST['textSeparator']; } // send mail if (isset($_POST['subject'])) { $this->subject = StringUtil::trim($_POST['subject']); } if (isset($_POST['text'])) { $this->text = StringUtil::trim($_POST['text']); } if (isset($_POST['from'])) { $this->from = StringUtil::trim($_POST['from']); } if (isset($_POST['enableHTML'])) { $this->enableHTML = intval($_POST['enableHTML']); } }
/** * @see \wcf\system\condition\ICondition::readFormParameters() */ public function readFormParameters() { if (isset($_POST['languageIDs']) && is_array($_POST['languageIDs'])) { $this->languageIDs = ArrayUtil::toIntegerArray($_POST['languageIDs']); } }
/** * Registers a deferred message. Returns `true` on any well-formed message and `false` * otherwise. * Deferred messages will be sent on shutdown. This can be useful if your handler depends * on data that may not be written to database yet or to achieve a better performance as the * page is delivered first. * * ATTENTION: Use this method only if your messages are not critical as you cannot check * whether your message was delivered successfully. * ATTENTION: Do NOT (!) send any security related information via sendDeferredMessage. * Not every push service can validate whether the userID given was forged by a malicious client! * * @see \wcf\system\push\PushHandler::sendMessage() */ public function sendDeferredMessage($message, array $userIDs = array(), array $payload = array()) { if (!$this->isEnabled()) { return false; } if (!\wcf\data\package\Package::isValidPackageName($message)) { return false; } $userIDs = array_unique(\wcf\util\ArrayUtil::toIntegerArray($userIDs)); $this->deferred[] = array('message' => $message, 'userIDs' => $userIDs, 'payload' => $payload); return true; }
/** * Exports labels. */ public function exportLabels($offset, $limit) { $prefixMap = array(); $boardIDs = array_keys(BoardCache::getInstance()->getBoards()); $sql = "SELECT\t*\n\t\t\tFROM\t" . $this->databasePrefix . "threadprefixes"; $statement = $this->database->prepareStatement($sql); $statement->execute(array(0)); while ($row = $statement->fetchArray()) { $forums = array_unique(ArrayUtil::toIntegerArray(explode(',', $row['forums']))); foreach ($forums as $key => $forum) { if ($forum == -1) { continue; } $forums[$key] = ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $forum); } // -1 = global if (in_array('-1', $forums)) { $forums = $boardIDs; } foreach ($forums as $forum) { if (!isset($prefixMap[$forum])) { $prefixMap[$forum] = array(); } $prefixMap[$forum][$row['pid']] = $row['prefix']; } } // save prefixes if (!empty($prefixMap)) { $objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.label.objectType', 'com.woltlab.wbb.board'); foreach ($prefixMap as $forumID => $data) { // import label group ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($forumID, array('groupName' => 'labelgroup' . $forumID), array('objects' => array($objectType->objectTypeID => array($forumID)))); // import labels foreach ($data as $prefixID => $prefix) { ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($forumID . '-' . $prefixID, array('groupID' => $forumID, 'label' => $prefix)); } } } }
/** * @see wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['username'])) $this->username = StringUtil::trim($_POST['username']); if (isset($_POST['email'])) $this->email = StringUtil::trim($_POST['email']); if (isset($_POST['groupIDArray']) && is_array($_POST['groupIDArray'])) $this->groupIDArray = ArrayUtil::toIntegerArray($_POST['groupIDArray']); if (isset($_POST['languageIDArray']) && is_array($_POST['languageIDArray'])) $this->languageIDArray = ArrayUtil::toIntegerArray($_POST['languageIDArray']); if (isset($_POST['invertGroupIDs'])) $this->invertGroupIDs = intval($_POST['invertGroupIDs']); // assign to group if (isset($_POST['assignToGroupIDArray']) && is_array($_POST['assignToGroupIDArray'])) $this->assignToGroupIDArray = ArrayUtil::toIntegerArray($_POST['assignToGroupIDArray']); // export mail address if (isset($_POST['fileType']) && $_POST['fileType'] == 'xml') $this->fileType = $_POST['fileType']; if (isset($_POST['separator'])) $this->separator = $_POST['separator']; if (isset($_POST['textSeparator'])) $this->textSeparator = $_POST['textSeparator']; // send mail if (isset($_POST['subject'])) $this->subject = StringUtil::trim($_POST['subject']); if (isset($_POST['text'])) $this->text = StringUtil::trim($_POST['text']); if (isset($_POST['from'])) $this->from = StringUtil::trim($_POST['from']); if (isset($_POST['enableHTML'])) $this->enableHTML = intval($_POST['enableHTML']); }
/** * @see wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); if (isset($_POST['username'])) { $this->username = StringUtil::trim($_POST['username']); } if (isset($_POST['email'])) { $this->email = StringUtil::trim($_POST['email']); } if (isset($_POST['userID'])) { $this->userID = intval($_POST['userID']); } if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) { $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); } if (isset($_POST['languageIDs']) && is_array($_POST['languageIDs'])) { $this->languageIDs = ArrayUtil::toIntegerArray($_POST['languageIDs']); } if (isset($_POST['invertGroupIDs'])) { $this->invertGroupIDs = intval($_POST['invertGroupIDs']); } if (isset($_POST['itemsPerPage'])) { $this->itemsPerPage = intval($_POST['itemsPerPage']); } if (isset($_POST['sortField'])) { $this->sortField = $_POST['sortField']; } if (isset($_POST['sortOrder'])) { $this->sortOrder = $_POST['sortOrder']; } if (isset($_POST['columns']) && is_array($_POST['columns'])) { $this->columns = $_POST['columns']; } if (isset($_POST['values']) && is_array($_POST['values'])) { $this->values = $_POST['values']; } }