Skip to content
Browse files

MDL-38852 flickr_public: fix missing setType calls

  • Loading branch information...
1 parent 5077e85 commit 13eeb23cc2f2531662ce29a033f36121c9bf7472 @danpoltawski danpoltawski committed Apr 3, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 repository/flickr_public/lib.php
View
2 repository/flickr_public/lib.php
@@ -484,6 +484,7 @@ public function get_file($photoid, $file = '') {
*/
public static function instance_config_form($mform) {
$mform->addElement('text', 'email_address', get_string('emailaddress', 'repository_flickr_public'));
+ $mform->setType('email_address', PARAM_RAW_TRIMMED); // This is for sending to flickr. Not our job to validate it.
$mform->addElement('checkbox', 'usewatermarks', get_string('watermark', 'repository_flickr_public'));
$mform->setDefault('usewatermarks', 0);
}
@@ -508,6 +509,7 @@ public static function type_config_form($mform, $classname = 'repository') {
$strrequired = get_string('required');
$mform->addElement('text', 'api_key', get_string('apikey', 'repository_flickr_public'), array('value'=>$api_key,'size' => '40'));
+ $mform->setType('api_key', PARAM_RAW_TRIMMED);
$mform->addRule('api_key', $strrequired, 'required', null, 'client');
$mform->addElement('static', null, '', get_string('information','repository_flickr_public'));

0 comments on commit 13eeb23

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