From a34947c283730ea36b2b3e91f867583d1c8123ee Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 19 May 2009 18:35:38 +0000 Subject: [PATCH] MDL-19163 restore - warn if restoring over SITEID course ; merged from 19_STABLE --- backup/restore_check.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backup/restore_check.html b/backup/restore_check.html index 0b9b3e16bd..722e85e1ec 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -291,6 +291,15 @@ $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) { -- 2.39.5