From: skodak Date: Sun, 8 Oct 2006 09:51:22 +0000 (+0000) Subject: removed obsoleted backup configuration scripts X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=badc7070cd976301898df15c92536ed7c382a942;p=moodle.git removed obsoleted backup configuration scripts --- diff --git a/admin/backup.php b/admin/backup.php deleted file mode 100644 index 8be76bc139..0000000000 --- a/admin/backup.php +++ /dev/null @@ -1,130 +0,0 @@ - $value) { - backup_set_config($name, $value); - } - - //And now, we execute schedule_backup_next_execution() for each course in the server to have the next - //execution time updated automatically everytime it's changed. - $status = true; - //get admin - $admin = get_admin(); - if (!$admin) { - $status = false; - } - //get backup config - if (! $backup_config = backup_get_config()) { - $status = false; - } - if ($status) { - //get courses - if ($courses = get_records('course', '', '', '', 'id,shortname')) { - //For each course, we check (insert, update) the backup_course table - //with needed data - foreach ($courses as $course) { - //We check if the course exists in backup_course - $backup_course = get_record("backup_courses","courseid",$course->id); - //If it doesn't exist, create - if (!$backup_course) { - $temp_backup_course->courseid = $course->id; - $newid = insert_record("backup_courses",$temp_backup_course); - //And get it from db - $backup_course = get_record("backup_courses","id",$newid); - } - //Now, calculate next execution of the course - $nextstarttime = schedule_backup_next_execution ($backup_course,$backup_config,time(),$admin->timezone); - //Save it to db - set_field("backup_courses","nextstarttime",$nextstarttime,"courseid",$backup_course->courseid); - } - } - } - - if (!$error) { - redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1); - exit; - } - } - -/// Otherwise print the form. - - $stradmin = get_string("administration"); - $strconfiguration = get_string("configuration"); - $strbackup = get_string("backup"); - - print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname, - "$stradmin -> ". - "$strconfiguration -> ". - $strbackup); - - echo "

".get_string("logs")."

"; - - print_heading($strbackup); - - print_simple_box("
".get_string("adminhelpbackup")."
", "center", "50%"); - echo "
"; - - print_simple_box_start("center"); - - //Check for required functions... - if (!function_exists('utf8_encode')) { - notify("You need to add XML support to your PHP installation"); - } - include ("$CFG->dirroot/backup/config.html"); - - print_simple_box_end(); - - print_footer(); - -?> diff --git a/backup/config.html b/backup/config.html deleted file mode 100644 index fe0a908f1b..0000000000 --- a/backup/config.html +++ /dev/null @@ -1,233 +0,0 @@ -backup_sche_modules)) { - $backup_config->backup_sche_modules = 1; - } - if (!isset($backup_config->backup_sche_withuserdata)) { - $backup_config->backup_sche_withuserdata = 1; - } - if (!isset($backup_config->backup_sche_metacourse)) { - $backup_config->backup_sche_metacourse = 1; - } - if (!isset($backup_config->backup_sche_users)) { - $backup_config->backup_sche_users = 1; - } - if (!isset($backup_config->backup_sche_logs)) { - $backup_config->backup_sche_logs = 0; - } - if (!isset($backup_config->backup_sche_userfiles)) { - $backup_config->backup_sche_userfiles = 1; - } - if (!isset($backup_config->backup_sche_coursefiles)) { - $backup_config->backup_sche_coursefiles = 1; - } - if (!isset($backup_config->backup_sche_messages)) { - $backup_config->backup_sche_messages = 0; - } - if (!isset($backup_config->backup_sche_active)) { - $backup_config->backup_sche_active = 0; - } - if (!isset($backup_config->backup_sche_weekdays)) { - $backup_config->backup_sche_weekdays = "0000000"; - } - if (!isset($backup_config->backup_sche_hour)) { - $backup_config->backup_sche_hour = 00; - } - if (!isset($backup_config->backup_sche_minute)) { - $backup_config->backup_sche_minute = 00; - } - if (!isset($backup_config->backup_sche_destination)) { - $backup_config->backup_sche_destination = ""; - } - if (!isset($backup_config->backup_sche_keep)) { - $backup_config->backup_sche_keep = 1; - } - - //print_object($backup_config); //Debug - - //Yes/no array for use in yes/no menu - $yesno_array[0] = $no; - $yesno_array[1] = $yes; - - //With user data/without user data array for use in menu - $withwithout_array[0] = $withoutuserdata; - $withwithout_array[1] = $withuserdata; - - //Course/alla array for use in course/all menu - $courseall_array[0] = $all; - $courseall_array[1] = $course; - - //Keep array for use in keep menu - $keep_array[0] = $all; - $keep_array[1] = "1"; - $keep_array[2] = "2"; - $keep_array[5] = "5"; - $keep_array[10] = "10"; - $keep_array[20] = "20"; - $keep_array[30] = "30"; - $keep_array[40] = "40"; - $keep_array[50] = "50"; - $keep_array[100] = "100"; - $keep_array[200] = "200"; - $keep_array[300] = "300"; - $keep_array[400] = "400"; - $keep_array[500] = "500"; -?> -
-sesskey."\"/>"; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: - backup_sche_modules, "") ?> - backup_sche_withuserdata, "") ?> - - -
: - backup_sche_metacourse, "") ?> - - -
: - backup_sche_users, "") ?> - - -
: - backup_sche_logs, "") ?> - - -
: - backup_sche_userfiles, "") ?> - - -
: - backup_sche_coursefiles, "") ?> - - -
: - backup_sche_messages, "") ?> - - -
: - backup_sche_keep, ""); - print_string("files"); - ?> - - -
- : backup_sche_active, "") ?> -
- backup_sche_weekdays,$stddayofweek,1) == "1") { - $strchecked = " checked=\"checked\""; - } else { - $strchecked = ""; - } - $check_names[] = ""; - $i++; - } - $table->align = array("center","center","center","center","center","center","center"); - $table->head = $day_names; - $table->data[] = $check_names; - print_table($table); - ?> -
- : backup_sche_hour,$backup_config->backup_sche_minute)) ?> -
- :
"; } ?> -
- " />
- -