From: stronk7 Date: Wed, 10 Mar 2004 16:15:42 +0000 (+0000) Subject: Now user_files are restored if the user existed previously but he X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=063a8895570bf50e0f6dada38027291d63ac393b;p=moodle.git Now user_files are restored if the user existed previously but he doesn't have a dir under the users dir. See bug 1123 (http://moodle.org/bugs/bug.php?op=show&bugid=1123) --- diff --git a/backup/restorelib.php b/backup/restorelib.php index efd435f4b8..051fc538f8 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -1065,7 +1065,9 @@ //If thar user exists in backup_ids if ($data) { //Only it user has been created now - if (strpos($data->info,"new") !== false) { + //or if it existed previously, but he hasn't image (see bug 1123) + if ((strpos($data->info,"new") !== false) or + (!check_dir_exists($dest_dir."/".$data->new_id,false))) { //Copy the old_dir to its new location (and name) !! //Only if destination doesn't exists if (!file_exists($dest_dir."/".$data->new_id)) {