本文整理汇总了PHP中AbstractForm::readParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractForm::readParameters方法的具体用法?PHP AbstractForm::readParameters怎么用?PHP AbstractForm::readParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractForm
的用法示例。
在下文中一共展示了AbstractForm::readParameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (WCF::getUser()->userID || WCF::getSession()->getVar('captchaDone')) {
$this->useCaptcha = false;
}
}
示例2: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['userID'])) {
$this->userID = intval($_REQUEST['userID']);
}
if (isset($_REQUEST['objectID'])) {
$this->objectID = intval($_REQUEST['objectID']);
}
if (isset($_REQUEST['objectType'])) {
$this->objectType = $_REQUEST['objectType'];
}
if ($this->objectID != 0 && $this->objectType != '') {
$this->object = Warning::getWarningObjectByID($this->objectType, $this->objectID);
if ($this->object === null) {
throw new IllegalLinkException();
}
}
// get user
$this->user = new UserSession($this->userID);
if (!$this->user->userID) {
throw new IllegalLinkException();
}
if ($this->user->getPermission('admin.user.infraction.canNotBeWarned')) {
throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.infraction.error.canNotBeWarned', array('user' => $this->user)));
}
if ($this->object !== null) {
// search existing warning
$sql = "SELECT\t*\n\t\t\t\tFROM\twcf" . WCF_N . "_user_infraction_warning_to_user\n\t\t\t\tWHERE\tpackageID = " . PACKAGE_ID . "\n\t\t\t\t\tAND objectID = " . $this->objectID . "\n\t\t\t\t\tAND objectType = '" . escapeString($this->objectType) . "'\n\t\t\t\t\tAND userID = " . $this->userID;
$warning = new UserWarning(null, WCF::getDB()->getFirstRow($sql));
if ($warning->warningID) {
throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.infraction.error.alreadyReported', array('warning' => $warning)));
}
}
}
示例3: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_GET['userID'])) {
$this->userID = intval($_GET['userID']);
}
}
示例4: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
AbstractForm::readParameters();
if (LOGIN_USE_CAPTCHA && !WCF::getSession()->getVar('captchaDone')) {
$this->useCaptcha = true;
}
}
示例5: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (!empty($_REQUEST['url'])) {
$this->url = $_REQUEST['url'];
}
}
示例6: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['q'])) {
$this->query = StringUtil::trim($_REQUEST['q']);
}
}
示例7: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
AbstractForm::readParameters();
if (isset($_REQUEST['category'])) {
$this->activeCategory = $_REQUEST['category'];
}
$this->user = WCF::getUser();
}
示例8: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
// get available conditions
$this->availableRuleConditionTypes = PMRule::getAvailableRuleConditionTypes();
// get available actions
$this->availableRuleActions = PMRule::getAvailableRuleActions();
}
示例9: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['messageID'])) {
$this->messageID = intval($_REQUEST['messageID']);
}
if (isset($_REQUEST['userID'])) {
$this->userID = intval($_REQUEST['userID']);
}
}
示例10: readParameters
/**
* @see Page::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']);
}
}
示例11: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
AbstractForm::readParameters();
if (isset($_REQUEST['optionID'])) {
$this->optionID = intval($_REQUEST['optionID']);
}
$this->userOption = new UserOptionEditor($this->optionID);
if (!$this->userOption->optionID || $this->userOption->editable > 3 || $this->userOption->visible > 3) {
throw new IllegalLinkException();
}
}
示例12: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
AbstractForm::readParameters();
if (isset($_REQUEST['smileyID'])) {
$this->smileyID = intval($_REQUEST['smileyID']);
}
$this->smiley = new SmileyEditor($this->smileyID);
if (!$this->smiley->smileyID) {
throw new IllegalLinkException();
}
}
示例13: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
AbstractForm::readParameters();
if (isset($_REQUEST['sponsortalkID'])) {
$this->sponsortalkID = intval($_REQUEST['sponsortalkID']);
}
$this->entry = new ContestSponsortalkEditor($this->sponsortalkID);
if (!$this->entry->sponsortalkID || !$this->entry->isEditable()) {
throw new IllegalLinkException();
}
}
示例14: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_GET['allianceID'])) {
$this->allianceID = intval($_GET['allianceID']);
}
if (!isset($_GET['allianceID']) || $this->allianceID != WCF::getUser()->ally_id) {
require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
throw new IllegalLinkException();
}
}
示例15: readParameters
/**
* @see Page::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();
}
if (isset($_REQUEST['pmSuccess'])) {
$this->pmSuccess = intval($_REQUEST['pmSuccess']);
}
}