Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-38852 repository_webdav: missing setType calls

  • Loading branch information...
commit b53ae614821923c4f3141d4cd43c70da2699c2a7 1 parent 8077527
Dan Poltawski danpoltawski authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 repository/webdav/lib.php
4 repository/webdav/lib.php
@@ -166,9 +166,11 @@ public static function instance_config_form($mform) {
166 166
167 167 $mform->addElement('text', 'webdav_server', get_string('webdav_server', 'repository_webdav'), array('size' => '40'));
168 168 $mform->addRule('webdav_server', get_string('required'), 'required', null, 'client');
  169 + $mform->setType('webdav_server', PARAM_HOST);
169 170
170 171 $mform->addElement('text', 'webdav_path', get_string('webdav_path', 'repository_webdav'), array('size' => '40'));
171 172 $mform->addRule('webdav_path', get_string('required'), 'required', null, 'client');
  173 + $mform->setType('webdav_path', PARAM_PATH);
172 174
173 175 $choices = array();
174 176 $choices['none'] = get_string('none');
@@ -178,7 +180,9 @@ public static function instance_config_form($mform) {
178 180 $mform->addRule('webdav_auth', get_string('required'), 'required', null, 'client');
179 181
180 182 $mform->addElement('text', 'webdav_port', get_string('webdav_port', 'repository_webdav'), array('size' => '40'));
  183 + $mform->setType('webdav_port', PARAM_INT);
181 184 $mform->addElement('text', 'webdav_user', get_string('webdav_user', 'repository_webdav'), array('size' => '40'));
  185 + $mform->setType('webdav_user', PARAM_RAW_TRIMMED); // Not for us to clean.
182 186 $mform->addElement('password', 'webdav_password', get_string('webdav_password', 'repository_webdav'),
183 187 array('size' => '40'));
184 188 }

0 comments on commit b53ae61

Please sign in to comment.
Something went wrong with that request. Please try again.