]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20901 fixed input validationand removed annoying redirect which must not be click...
authorPetr Skoda <skodak@moodle.org>
Thu, 19 Nov 2009 18:48:34 +0000 (18:48 +0000)
committerPetr Skoda <skodak@moodle.org>
Thu, 19 Nov 2009 18:48:34 +0000 (18:48 +0000)
backup/restore.php
backup/restore_check.html
backup/restorelib.php

index 482eb5ba95424c6e1c9dc79c4b6572c3c3b8a7d0..bbc424f548b2a211184b91d984608ab0c19bd008 100644 (file)
         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");
         }
         //Unset this for the future
         unset($SESSION->cancontinue);
+        require_sesskey();
         include_once("restore_execute.html");
     }
     echo $OUTPUT->box_end();
index f361f4b087bef09159cda13f7871a1a45a9ccef2..98e5edfa6aa7b5a262f621fa4a8fb24536ebe031 100644 (file)
             $hidden["launch"]             = "execute";
             $hidden["file"]               =  $file;
             $hidden["id"]                 =  $id;
+            $hidden["sesskey"]            =  sesskey();
             print_string('longtimewarning','admin');
 
 
index f319f45e24cf0cea1f694069bde0ed86daa5a409..e4df732aca307cf98c61ea1c6506214802f25213 100644 (file)
@@ -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;