Skip to content

Commit

Permalink
MDL-38852 repository_webdav: missing setType calls
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Apr 3, 2013
1 parent 8077527 commit b53ae61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions repository/webdav/lib.php
Expand Up @@ -166,9 +166,11 @@ public static function instance_config_form($mform) {

$mform->addElement('text', 'webdav_server', get_string('webdav_server', 'repository_webdav'), array('size' => '40'));
$mform->addRule('webdav_server', get_string('required'), 'required', null, 'client');
$mform->setType('webdav_server', PARAM_HOST);

$mform->addElement('text', 'webdav_path', get_string('webdav_path', 'repository_webdav'), array('size' => '40'));
$mform->addRule('webdav_path', get_string('required'), 'required', null, 'client');
$mform->setType('webdav_path', PARAM_PATH);

$choices = array();
$choices['none'] = get_string('none');
Expand All @@ -178,7 +180,9 @@ public static function instance_config_form($mform) {
$mform->addRule('webdav_auth', get_string('required'), 'required', null, 'client');

$mform->addElement('text', 'webdav_port', get_string('webdav_port', 'repository_webdav'), array('size' => '40'));
$mform->setType('webdav_port', PARAM_INT);
$mform->addElement('text', 'webdav_user', get_string('webdav_user', 'repository_webdav'), array('size' => '40'));
$mform->setType('webdav_user', PARAM_RAW_TRIMMED); // Not for us to clean.
$mform->addElement('password', 'webdav_password', get_string('webdav_password', 'repository_webdav'),
array('size' => '40'));
}
Expand Down

0 comments on commit b53ae61

Please sign in to comment.