Permalink
Browse files

Merge branch 'MDL-24684_master' of git://github.com/stronk7/moodle

  • Loading branch information...
2 parents 4ea6ce7 + b7a45fa commit 54ae8ed032408b1c1087000017a4f58c13b1049c Sam Hemelryk committed Jun 30, 2011
Showing with 10 additions and 0 deletions.
  1. +3 −0 backup/controller/backup_controller.class.php
  2. +7 −0 backup/controller/restore_controller.class.php
@@ -290,6 +290,9 @@ public function get_logger() {
* @return void Throws and exception of completes
*/
public function execute_plan() {
+ // 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);
return $this->plan->execute();
}
@@ -296,6 +296,9 @@ public function get_logger() {
}
public function execute_plan() {
+ // 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);
return $this->plan->execute();
}
@@ -383,6 +386,10 @@ public function convert() {
global $CFG;
require_once($CFG->dirroot . '/backup/util/helper/convert_helper.class.php');
+ // 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);
+
if ($this->status != backup::STATUS_REQUIRE_CONV) {
throw new restore_controller_exception('cannot_convert_not_required_status');
}

0 comments on commit 54ae8ed

Please sign in to comment.