mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: allow for increase_time_limit_to to work if $_increase_time_limit_max is not yet set
This commit is contained in:
parent
69e736a02c
commit
8a4c51893b
@ -27,6 +27,9 @@ error_reporting(E_ALL | E_STRICT);
|
|||||||
*/
|
*/
|
||||||
require_once dirname(__FILE__).'/Constants.php';
|
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
|
* 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) {
|
function increase_time_limit_to($timeLimit = null) {
|
||||||
$max = get_increase_time_limit_max();
|
$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(!ini_get('safe_mode')) {
|
||||||
if(!$timeLimit) {
|
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()};
|
* Set the maximum allowed value for {@link increase_timeLimit_to()};
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user