Skip to content

Commit

Permalink
MDL-12886 fixed param typo and adding new timeout method
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 7, 2009
1 parent 13e40ad commit 2965d27
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/externallib.php
Expand Up @@ -48,10 +48,22 @@ class external_api {
* @param stdClass $contex
* @return void
*/
public static function set_context_restriction($contex) {
public static function set_context_restriction($context) {
self::$contextrestriction = $context;
}

/**
* This method has to be called before every operation
* that takes a longer time to finish!
*
* @param int $seconds max expected time the next operation needs
* @return void
*/
public static function set_timeout($seconds=360) {
$seconds = ($seconds < 300) ? 300 : $seconds;
set_time_limit($seconds);
}

/**
* Validates submitted function parameters, if anything is incorrect
* invalid_parameter_exception is thrown.
Expand Down

0 comments on commit 2965d27

Please sign in to comment.