From: moodler Date: Wed, 3 May 2006 02:00:32 +0000 (+0000) Subject: Add a warning when trying to restore a pre-1.6 backup on a X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c4292470ba31e41364e0ed70bf679bea3815965b;p=moodle.git Add a warning when trying to restore a pre-1.6 backup on a 1.6 Unicode Moodle, with a link to the docs. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 6fb42a6a06..69b41c370b 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -307,6 +307,8 @@ //This function prints the contents from the info parammeter passed function restore_print_info ($info) { + global $CFG; + $status = true; if ($info) { //This is tha align to every ingo table @@ -333,6 +335,11 @@ $table->data = $tab; //Print backup general info print_table($table); + + if ($info->backup_backup_version <= 2005070500 && !empty($CFG->unicodedb)) { + notify(get_string('backupnonisowarning')); // Message informing that this backup may not work! + } + //Now backup contents in another table $tab = array(); //First mods info diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 871c3cb2fc..e19ad6506e 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -130,10 +130,11 @@ $string['backuploglaststatus'] = 'Last execution log'; $string['backuplogshelp'] = 'If enabled, then course logs will be included in automated backups'; $string['backupmetacoursehelp'] = 'If enabled, then metacourse info (inherited enrolments) will be included in automated backups'; $string['backupnameformat'] = '%%Y%%m%%d-%%H%%M'; -$string['backupnoneusersinfo'] = 'Notice: You have selected to backup \"none\" users, so all the modules backup have been switched to \"without user data\" mode. Please note that the \"exercise\" and \"workshop\" modules aren\'t compatible with this type of backup, so they have been deactivated completely.'; +$string['backupnoneusersinfo'] = 'Notice: You have selected to backup no users (\"none\"), so all the modules backup have been switched to \"without user data\" mode. Please note that the \"exercise\" and \"workshop\" modules aren\'t compatible with this type of backup, so they have been deactivated completely.'; +$string['backupnonisowarning'] = 'Warning: this backup is from a non-Unicode version of Moodle (pre 1.6). If this backup contains any non-ASCII texts then they may be CORRUPTED if you try to restore them to this Unicode version of Moodle. See the Backup FAQ for more information about how to recover this backup correctly.'; $string['backuporiginalname'] = 'Backup Name'; $string['backupsavetohelp'] = 'Full path to the directory where you want to save the backup files
(leave blank to save in its course default dir)'; -$string['backuptakealook'] = 'Please take a look to your backup logs in: +$string['backuptakealook'] = 'Please take a look at your backup logs in: $a'; $string['backupuserfileshelp'] = 'Choose whether user files (eg profile images) should be included in automated backups'; $string['backupusershelp'] = 'Select whether you want to include all the users in the server or only the needed users for each course';