MDL-38852 repository_s3: fix missing setType calls
authorDan Poltawski <dan@moodle.com>
Wed, 3 Apr 2013 02:51:50 +0000 (10:51 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 3 Apr 2013 03:14:02 +0000 (11:14 +0800)
repository/s3/lib.php

index 346f771..f9d8bff 100644 (file)
@@ -236,7 +236,9 @@ class repository_s3 extends repository {
         parent::type_config_form($mform);
         $strrequired = get_string('required');
         $mform->addElement('text', 'access_key', get_string('access_key', 'repository_s3'));
+        $mform->setType('access_key', PARAM_RAW_TRIMMED);
         $mform->addElement('text', 'secret_key', get_string('secret_key', 'repository_s3'));
+        $mform->setType('secret_key', PARAM_RAW_TRIMMED);
         $mform->addRule('access_key', $strrequired, 'required', null, 'client');
         $mform->addRule('secret_key', $strrequired, 'required', null, 'client');
     }