]> git.mjollnir.org Git - moodle.git/commitdiff
Changed max_execution_time and memory_limit php variables
authorstronk7 <stronk7>
Wed, 11 Jun 2003 19:13:07 +0000 (19:13 +0000)
committerstronk7 <stronk7>
Wed, 11 Jun 2003 19:13:07 +0000 (19:13 +0000)
to execute long and heavy scripts (restore and backup)  :-)
Only affects current script execution

backup/backup.php
backup/restore.php

index e310ab0bc4e0b28714463161dae9024721b15891..7fae70390cfa7a64397e72723c7a0f9d69217741 100644 (file)
     //Print form     
     print_heading("$strcoursebackup: $course->fullname ($course->shortname)");
     print_simple_box_start("center", "", "$THEME->cellheading");
+
+    //Adjust some php variables to the execution of this script
+    ini_set("max_execution_time","300");
+    ini_set("memory_limit","56M");
+
     //Call the form, depending the step we are
     if (!$launch) {
         include_once("backup_form.html");
@@ -88,4 +93,3 @@
     print_footer();
 
 ?>
-
index aa7840b74cd53c17d4f850c56be07bf4e0fd26e7..274bcc608fb0e2ad81538a01a11df7cc7cb9361f 100644 (file)
     }
     
     //Check backup_version
-    upgrade_backup_db($backup_version,$backup_release,"restore.php");
+    if ($file) {
+        $linkto = "restore.php?file=".$file;
+    } else {
+        $linkto = "restore.php";
+    }
+    upgrade_backup_db($backup_version,$backup_release,$linkto);
 
     //Get strings
     $strcourserestore = get_string("courserestore");
     //Print form
     print_heading("$strcourserestore: ".basename($file));
     print_simple_box_start("center", "", "$THEME->cellheading");
+    
+    //Adjust some php variables to the execution of this script
+    ini_set("max_execution_time","300");
+    ini_set("memory_limit","56M");
 
     //Call the form, depending the step we are
     if (!$launch) {
@@ -89,4 +98,3 @@
     print_footer();
 
 ?>
-