]> git.mjollnir.org Git - moodle.git/commitdiff
Sometimes ssl connections are slow. Increase max_execution_time to 5 minutes. Merged...
authorethem <ethem>
Mon, 24 Jul 2006 16:32:38 +0000 (16:32 +0000)
committerethem <ethem>
Mon, 24 Jul 2006 16:32:38 +0000 (16:32 +0000)
enrol/authorize/authorizenetlib.php
enrol/authorize/locallib.php

index 8759dd85e5be7945cd09a518e30b3ffae1dbd2f7..e6e01696d0a8e8d9ddb72087a20cb697d84075d6 100644 (file)
@@ -11,6 +11,7 @@ define('AN_DELIM',    '|');
 define('AN_ENCAP',    '"');
 
 require_once('const.php');
+require_once('enrol.php');
 
 /**
  * Gets settlement date and time
@@ -241,7 +242,12 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE)
         return false;
     }
 
-    @ignore_user_abort(true); // this is critical section
+    // critical section
+    @ignore_user_abort(true);
+    if (intval(ini_get('max_execution_time')) > 0) {
+        @set_time_limit(300);
+    }
+
     fwrite($fp, "POST /gateway/transact.dll HTTP/1.0\r\n" .
                 "Host: $host\r\n" . $referer .
                 "Content-type: application/x-www-form-urlencoded\r\n" .
index 50eae6e1ee31aea8cfaf44ee6455e638a407bf8e..cf7949c61736b02f82aeee320ff691f219d7e4fe 100644 (file)
@@ -5,7 +5,6 @@ if (!defined('MOODLE_INTERNAL')) {
 }
 
 require_once('const.php');
-require_once('enrol.php');
 require_once('authorizenetlib.php');
 
 define('ORDER_CAPTURE', 'capture');