]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19163 restore - warn if restoring over SITEID course ; merged from 19_STABLE
authorstronk7 <stronk7>
Tue, 19 May 2009 18:35:38 +0000 (18:35 +0000)
committerstronk7 <stronk7>
Tue, 19 May 2009 18:35:38 +0000 (18:35 +0000)
backup/restore_check.html

index 0b9b3e16bd090579cc83877b4ad7a065b0eb9c2d..722e85e1ec66a5695a011507f3ef9f5451360373 100644 (file)
         $show_continue_button = true;
         $messages = array();
 
+        //Check and warn if we are restoring over frontpage (SITEID) course. MDL-19163
+        if ($restore->course_id == SITEID) {
+            if ($restore->restoreto == 0) {
+                $messages[] = get_string ('restoretositedeleting');
+            } else if ($restore->restoreto == 1) {
+                $messages[] = get_string ('restoretositeadding');
+            }
+        }
+
         //Check if we've selected any mod's user info and restore->users
         //is set to none. Change it to course and inform.
         if ($restore->users == 2) {