Permalink
Browse files

MDL-24684 backup - basic protection against time/memory limits

  • Loading branch information...
1 parent ff555b5 commit 910c941fa81cf059451ebbc7bf3b3b1b10c5f641 @stronk7 stronk7 committed Jun 30, 2011
Showing with 6 additions and 0 deletions.
  1. +3 −0 backup/controller/backup_controller.class.php
  2. +3 −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();
}

0 comments on commit 910c941

Please sign in to comment.