finally now the restore should work and with correct unicode related coding style, sorry

This commit is contained in:
skodak 2006-03-07 19:53:56 +00:00
parent de9924ae0a
commit 25580a01bc
2 changed files with 5 additions and 1 deletions

View File

@ -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 {

View File

@ -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);