MDL-34311 mod_url: Missing setType on the external url
authorDan Poltawski <dan@moodle.com>
Mon, 25 Mar 2013 01:38:56 +0000 (09:38 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 25 Mar 2013 01:39:30 +0000 (09:39 +0800)
mod/url/mod_form.php

index 47d4251..3071939 100644 (file)
@@ -50,6 +50,7 @@ class mod_url_mod_form extends moodleform_mod {
         //-------------------------------------------------------
         $mform->addElement('header', 'content', get_string('contentheader', 'url'));
         $mform->addElement('url', 'externalurl', get_string('externalurl', 'url'), array('size'=>'60'), array('usefilepicker'=>true));
+        $mform->setType('externalurl', PARAM_URL);
         $mform->addRule('externalurl', null, 'required', null, 'client');
         //-------------------------------------------------------
         $mform->addElement('header', 'optionssection', get_string('optionsheader', 'url'));