mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
finally now the restore should work and with correct unicode related coding style, sorry
This commit is contained in:
parent
de9924ae0a
commit
25580a01bc
@ -473,6 +473,8 @@
|
||||
//This function is used to add slashes (and decode from UTF-8 if needed)
|
||||
//It's used intensivelly when restoring modules and saving them in db
|
||||
function backup_todb ($data) {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->unicodedb)) {
|
||||
return restore_decode_absolute_links(addslashes(utf8_decode($data)));
|
||||
} else {
|
||||
|
@ -2920,7 +2920,9 @@
|
||||
//This function is used to get the current contents property value
|
||||
//They are trimed (and converted from utf8 if needed)
|
||||
function getContents() {
|
||||
if (current_charset() != 'UTF-8') {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->unicodedb)) {
|
||||
return trim(utf8_decode($this->content));
|
||||
} else {
|
||||
return trim($this->content);
|
||||
|
Loading…
x
Reference in New Issue
Block a user