Permalink
Browse files

MDL-33808 - incorrect cleaning of repository names

  • Loading branch information...
1 parent 4557b47 commit 4a35940233e08ab22db033655f29bd4cd3cb9726 @danpoltawski danpoltawski committed Jun 19, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 repository/lib.php
View
@@ -1450,7 +1450,7 @@ public function supported_returntypes() {
$ft = new filetype_parser;
$meta = new stdClass();
$meta->id = $this->id;
- $meta->name = $this->get_name();
+ $meta->name = format_string($this->get_name());
$meta->type = $this->options['type'];
$meta->icon = $OUTPUT->pix_url('icon', 'repository_'.$meta->type)->out(false);
$meta->supported_types = $ft->get_extensions($this->supported_filetypes());
@@ -1762,6 +1762,7 @@ public function type_config_form($mform, $classname = 'repository') {
// it can be empty, then moodle will look for instance name from language string
$mform->addElement('text', 'pluginname', get_string('pluginname', 'repository'), array('size' => '40'));
$mform->addElement('static', 'pluginnamehelp', '', get_string('pluginnamehelp', 'repository'));
+ $mform->setType('pluginname', PARAM_TEXT);
}
}
@@ -1892,6 +1893,7 @@ protected function add_defaults() {
$mform->addElement('text', 'name', get_string('name'), 'maxlength="100" size="30"');
$mform->addRule('name', $strrequired, 'required', null, 'client');
+ $mform->setType('name', PARAM_TEXT);
}
public function definition() {

0 comments on commit 4a35940

Please sign in to comment.