finally now the restore should work and with correct unicode related coding style, sorry
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user