function __construct($params) { parent::__construct($params); // require nonce $this->setNonceRequired(); //required params $v1 = owa_coreAPI::validationFactory('required'); $v1->setValues($this->getParam('db_host')); $v1->setErrorMessage("Database host is required."); $this->setValidation('db_host', $v1); $v2 = owa_coreAPI::validationFactory('required'); $v2->setValues($this->getParam('db_name')); $v2->setErrorMessage("Database name is required."); $this->setValidation('db_name', $v2); $v3 = owa_coreAPI::validationFactory('required'); $v3->setValues($this->getParam('db_user')); $v3->setErrorMessage("Database user is required."); $this->setValidation('db_user', $v3); $v4 = owa_coreAPI::validationFactory('required'); $v4->setValues($this->getParam('db_password')); $v4->setErrorMessage("Database password is required."); $this->setValidation('db_password', $v4); $v7 = owa_coreAPI::validationFactory('required'); $v7->setValues($this->getParam('db_type')); $v7->setErrorMessage("Database type is required."); $this->setValidation('db_type', $v7); // Config for the public_url validation $v5 = owa_coreAPI::validationFactory('subStringMatch'); $v5->setConfig('match', '/'); $v5->setConfig('length', 1); $v5->setValues($this->getParam('public_url')); $v5->setConfig('position', -1); $v5->setConfig('operator', '='); $v5->setErrorMessage("Your URL of OWA's base directory must end with a slash."); $this->setValidation('public_url', $v5); // Config for the domain validation $v6 = owa_coreAPI::validationFactory('subStringPosition'); $v6->setConfig('substring', 'http'); $v6->setValues($this->getParam('public_url')); $v6->setConfig('position', 0); $v6->setConfig('operator', '='); $v6->setErrorMessage("Please add http:// or https:// to the beginning of your public url."); $this->setValidation('public_url', $v6); }
function __construct($params) { parent::__construct($params); // require nonce $this->setNonceRequired(); // validations $v1 = owa_coreAPI::validationFactory('required'); $v1->setValues($this->getParam('domain')); $v1->setErrorMessage($this->getMsg(3309)); $this->setValidation('domain', $v1); // validations $v2 = owa_coreAPI::validationFactory('required'); $v2->setValues($this->getParam('email_address')); $v2->setErrorMessage($this->getMsg(3310)); $this->setValidation('email_address', $v2); // validations $v5 = owa_coreAPI::validationFactory('required'); $v5->setValues($this->getParam('password')); $v5->setErrorMessage($this->getMsg(3310)); $this->setValidation('password', $v5); // Check entity exists $v3 = owa_coreAPI::validationFactory('entityDoesNotExist'); $v3->setConfig('entity', 'base.site'); $v3->setConfig('column', 'domain'); $v3->setValues($this->getParam('protocol') . $this->getParam('domain')); $v3->setErrorMessage($this->getMsg(3206)); $this->setValidation('domain', $v3); // Config for the domain validation $v4 = owa_coreAPI::validationFactory('subStringPosition'); $v4->setConfig('substring', 'http'); $v4->setValues($this->getParam('domain')); $v4->setConfig('position', 0); $v4->setConfig('operator', '!='); $v4->setErrorMessage($this->getMsg(3208)); $this->setValidation('domain', $v4); }
function __construct($params) { return parent::__construct($params); }
function __construct($params) { $this->setRequiredCapability('edit_modules'); return parent::__construct($params); }