mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
Convert loop_limit to a config item
This commit is contained in:
parent
513db6b8d1
commit
7a8c7b5b25
@ -433,6 +433,18 @@ $c->admin_email ='calendar-admin@example.com';
|
||||
*/
|
||||
// $c->disable_caldav_proxy_propfind_collections = array( 'User-Agent'=>'#regex1#', 'X-Client'=>'#regex2#');
|
||||
|
||||
/**
|
||||
* A limiter on how many times we'll apply the recurrence rules for an event
|
||||
* to find the next valid one.
|
||||
*
|
||||
* Default: 100
|
||||
*
|
||||
* If you see the following error message, you may want to consider increasing
|
||||
* it:
|
||||
* RRULE, loop limit has been hit in GetMoreInstances, you probably want to increase $c->rrule_loop_limit
|
||||
*/
|
||||
// $c->rrule_loop_limit = 100;
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL:
|
||||
* If true, names of groups (prefixed with "@") given as an event attendee
|
||||
|
||||
@ -109,11 +109,11 @@ function early_catch_fatal_error() {
|
||||
register_shutdown_function('early_catch_fatal_error');
|
||||
|
||||
$c->default_timezone = ini_get ( 'date.timezone' );
|
||||
if (empty ( $c->default_timezone )) {
|
||||
if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] ) ) {
|
||||
$c->default_timezone = 'Pacific/Auckland';
|
||||
}
|
||||
else if (empty ( $c->default_timezone )) {
|
||||
$c->default_timezone = 'UTC';
|
||||
if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] )) {
|
||||
$c->default_timezone = 'Pacific/Auckland';
|
||||
}
|
||||
}
|
||||
|
||||
// Default some of the configurable values
|
||||
@ -160,6 +160,10 @@ $c->readonly_webdav_collections = true; // WebDAV access is readonly
|
||||
// Kind of private configuration values
|
||||
$c->total_query_time = 0;
|
||||
|
||||
// Any many times GetMoreInstances in inc/RRule.php should loop trying to
|
||||
// find more instances.
|
||||
$c->rrule_loop_limit = 100;
|
||||
|
||||
$c->dbg = array();
|
||||
|
||||
|
||||
|
||||
@ -815,14 +815,14 @@ class RepeatRule {
|
||||
}
|
||||
|
||||
private function GetMoreInstances($return_floating_times=false) {
|
||||
global $c;
|
||||
if ( $this->finished ) return;
|
||||
$got_more = false;
|
||||
$loop_limit = 100;
|
||||
$loops = 0;
|
||||
if ( $return_floating_times ) $this->base->setAsFloat();
|
||||
while( !$this->finished && !$got_more) {
|
||||
if ($loops++ > $loop_limit ) {
|
||||
dbg_error_log ('ERROR', "RRULE, loop limit has been hit in GetMoreInstances, this probably needs to be increased (loop_limit: %d)", $loop_limit);
|
||||
if ($loops++ > $c->rrule_loop_limit ) {
|
||||
dbg_error_log ('ERROR', "RRULE, loop limit has been hit in GetMoreInstances, you probably want to increase \$c->rrule_loop_limit (currently %d)", $c->rrule_loop_limit);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -160,6 +160,10 @@ $c->readonly_webdav_collections = true; // WebDAV access is readonly
|
||||
// Kind of private configuration values
|
||||
$c->total_query_time = 0;
|
||||
|
||||
// Any many times GetMoreInstances in inc/RRule.php should loop trying to
|
||||
// find more instances.
|
||||
$c->rrule_loop_limit = 100;
|
||||
|
||||
$c->dbg = array();
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user