mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-20901 fixed input validationand removed annoying redirect which must not be clicked during course import
This commit is contained in:
parent
7e7089e359
commit
f54c4273da
@ -165,6 +165,7 @@
|
||||
if (!empty($SESSION->restore->importing)) {
|
||||
// set up all the config stuff and skip asking the user about it.
|
||||
restore_setup_for_check($SESSION->restore,$backup_unique_code);
|
||||
require_sesskey();
|
||||
include_once("restore_execute.html");
|
||||
} else {
|
||||
include_once("restore_form.html");
|
||||
@ -180,6 +181,7 @@
|
||||
}
|
||||
//Unset this for the future
|
||||
unset($SESSION->cancontinue);
|
||||
require_sesskey();
|
||||
include_once("restore_execute.html");
|
||||
}
|
||||
echo $OUTPUT->box_end();
|
||||
|
@ -359,6 +359,7 @@
|
||||
$hidden["launch"] = "execute";
|
||||
$hidden["file"] = $file;
|
||||
$hidden["id"] = $id;
|
||||
$hidden["sesskey"] = sesskey();
|
||||
print_string('longtimewarning','admin');
|
||||
|
||||
|
||||
|
@ -8021,10 +8021,9 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
}
|
||||
else {
|
||||
if (empty($noredirect)) {
|
||||
// in 2.0 we must not print "Continue" redirect link here, because ppl click on it and the execution gets interrupted on next page!!!
|
||||
// imo RESTORE_SILENTLY is an ugly hack :-P
|
||||
$sillystr = get_string('donotclickcontinue');
|
||||
redirect($CFG->wwwroot.'/backup/restore.php?backup_unique_code='.$backup_unique_code.'&launch=form&file='.$file.'&id='.$id, $sillystr, 0);
|
||||
print_continue($CFG->wwwroot.'/backup/restore.php?backup_unique_code='.$backup_unique_code.'&launch=form&file='.$file.'&id='.$id.'&sesskey='.sesskey());
|
||||
print_footer();
|
||||
die;
|
||||
|
||||
} else {
|
||||
return $backup_unique_code;
|
||||
|
Loading…
x
Reference in New Issue
Block a user