Skip to content

Commit

Permalink
Merge pull request #23 from aspark21/MOODLE_27_STABLE
Browse files Browse the repository at this point in the history
Moodle 27 stable branch version
  • Loading branch information
jleyva committed May 20, 2015
2 parents 76926cb + 9fefa6b commit 9f5dfe4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
9 changes: 2 additions & 7 deletions edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,8 @@ public function definition () {
$mform->setDefault('secret', md5(uniqid(rand(), 1)));
$mform->addRule('secret', get_string('required'), 'required');

if (class_exists('textlib')) {
$textlib = new textlib();
} else {
$textlib = textlib_get_instance();
}

$choices = $textlib->get_encodings();
$choices = core_text::get_encodings();
$mform->addElement('select', 'encoding', get_string('remoteencoding', 'local_ltiprovider'), $choices);
$mform->setDefault('encoding', 'UTF-8');

Expand Down Expand Up @@ -220,4 +215,4 @@ public function validation($data, $files) {
return $errors;
}

}
}
10 changes: 2 additions & 8 deletions tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,11 @@

// Transform to utf8 all the post and get data

if (class_exists('textlib')) {
$textlib = new textlib();
} else {
$textlib = textlib_get_instance();
}

foreach ($_POST as $key => $value) {
$_POST[$key] = $textlib->convert($value, $tool->encoding);
$_POST[$key] = core_text::convert($value, $tool->encoding);
}
foreach ($_GET as $key => $value) {
$_GET[$key] = $textlib->convert($value, $tool->encoding);
$_GET[$key] = core_text::convert($value, $tool->encoding);
}

// We need an username without extended chars
Expand Down

0 comments on commit 9f5dfe4

Please sign in to comment.