From 6472f6357f1f943dfcf801e4d079f601f5e87d6c Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 18 May 2005 18:07:02 +0000 Subject: [PATCH] Prevent multiple execution of restore. Bug 3291 (http://moodle.org/bugs/bug.php?op=show&bugid=3291) Merged from MOODLE_14_STABLE --- backup/restore.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backup/restore.php b/backup/restore.php index c0ac5827fec..25abe62d5da 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -129,7 +129,15 @@ } } else if ($launch == "check") { include_once("restore_check.html"); + //To avoid multiple restore executions... + $SESSION->cancontinue = true; } else if ($launch == "execute") { + //Prevent multiple restore executions... + if (empty($SESSION->cancontinue)) { + error("Multiple restore execution not allowed!"); + } + //Unset this for the future + unset($SESSION->cancontinue); include_once("restore_execute.html"); } print_simple_box_end();