From 91dbb244428424e21ba455c5fea5785ff249f1df Mon Sep 17 00:00:00 2001 From: Michael Aherne Date: Mon, 2 Sep 2013 10:22:40 +0100 Subject: [PATCH] MDL-41254 backup Raise time and memory limit in precheck. --- backup/controller/restore_controller.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backup/controller/restore_controller.class.php b/backup/controller/restore_controller.class.php index ae3d58a4a34..26233c04d77 100644 --- a/backup/controller/restore_controller.class.php +++ b/backup/controller/restore_controller.class.php @@ -335,6 +335,9 @@ class restore_controller extends backup implements loggable { if ($this->status != backup::STATUS_NEED_PRECHECK) { throw new restore_controller_exception('cannot_precheck_wrong_status', $this->status); } + // Basic/initial prevention against time/memory limits + set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted + raise_memory_limit(MEMORY_EXTRA); $this->precheck = restore_prechecks_helper::execute_prechecks($this, $droptemptablesafter); if (!array_key_exists('errors', $this->precheck)) { // No errors, can be executed $this->set_status(backup::STATUS_AWAITING);