mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4273 from stevie-mayhew/pulls/increase_time_limit
FIX: increase_time_limit_to work when increase_time_limit_max is not yet set
This commit is contained in:
commit
7cd5cf3d4a
@ -27,6 +27,9 @@ error_reporting(E_ALL | E_STRICT);
|
||||
*/
|
||||
require_once dirname(__FILE__).'/Constants.php';
|
||||
|
||||
global $_increase_time_limit_max;
|
||||
$_increase_time_limit_max = -1;
|
||||
|
||||
/**
|
||||
* Priorities definition. These constants are used in calls to _t() as an optional argument
|
||||
*/
|
||||
@ -255,7 +258,7 @@ function translate_memstring($memString) {
|
||||
*/
|
||||
function increase_time_limit_to($timeLimit = null) {
|
||||
$max = get_increase_time_limit_max();
|
||||
if($max != -1 && $timeLimit > $max) return false;
|
||||
if($max != -1 && $max != null && $timeLimit > $max) return false;
|
||||
|
||||
if(!ini_get('safe_mode')) {
|
||||
if(!$timeLimit) {
|
||||
@ -274,8 +277,6 @@ function increase_time_limit_to($timeLimit = null) {
|
||||
}
|
||||
}
|
||||
|
||||
$_increase_time_limit_max = -1;
|
||||
|
||||
/**
|
||||
* Set the maximum allowed value for {@link increase_timeLimit_to()};
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user