mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Add more logging to investigate the 28th problem on issue #248
I reckon this is useful logging to have, keep it around.
This commit is contained in:
parent
7d0e2f2435
commit
6e68c221e9
@ -366,13 +366,14 @@ class RepeatRuleDateTime extends DateTime {
|
|||||||
if ( isset($matches[8]) && $matches[8] != '' ) $interval .= $minus . $matches[9] . ' minutes ';
|
if ( isset($matches[8]) && $matches[8] != '' ) $interval .= $minus . $matches[9] . ' minutes ';
|
||||||
if (isset($matches[10]) &&$matches[10] != '' ) $interval .= $minus . $matches[11] . ' seconds ';
|
if (isset($matches[10]) &&$matches[10] != '' ) $interval .= $minus . $matches[11] . ' seconds ';
|
||||||
}
|
}
|
||||||
// printf( "Modify '%s' by: >>%s<<\n", $this->__toString(), $interval );
|
if ( DEBUG_RRULE) dbg_error_log( 'RRULE', "Modify '%s' by: >>%s<<\n", $this->__toString(), $interval );
|
||||||
// print_r($this);
|
// print_r($this);
|
||||||
if ( !isset($interval) || $interval == '' ) $interval = '1 day';
|
if ( !isset($interval) || $interval == '' ) $interval = '1 day';
|
||||||
if ( parent::format('d') > 28 && strstr($interval,'month') !== false ) {
|
if ( parent::format('d') > 28 && strstr($interval,'month') !== false ) {
|
||||||
$this->setDate(null,null,28);
|
$this->setDate(null,null,28);
|
||||||
}
|
}
|
||||||
parent::modify($interval);
|
parent::modify($interval);
|
||||||
|
if (DEBUG_RRULE) dbg_error_log( 'RRULE', "Modified to '%s'", $this->__toString() );
|
||||||
return $this->__toString();
|
return $this->__toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -837,6 +838,7 @@ class RepeatRule {
|
|||||||
$this->current_set = array( clone($this->current_base) );
|
$this->current_set = array( clone($this->current_base) );
|
||||||
foreach( self::rrule_expand_limit($this->freq) AS $bytype => $action ) {
|
foreach( self::rrule_expand_limit($this->freq) AS $bytype => $action ) {
|
||||||
if ( isset($this->{$bytype}) ) {
|
if ( isset($this->{$bytype}) ) {
|
||||||
|
if ( DEBUG_RRULE ) dbg_error_log( 'RRULE', "Going to find more instances by running %s_%s()", $action, $bytype );
|
||||||
$this->{$action.'_'.$bytype}();
|
$this->{$action.'_'.$bytype}();
|
||||||
if ( !isset($this->current_set[0]) ) break;
|
if ( !isset($this->current_set[0]) ) break;
|
||||||
}
|
}
|
||||||
@ -847,6 +849,7 @@ class RepeatRule {
|
|||||||
|
|
||||||
$position = count($this->instances) - 1;
|
$position = count($this->instances) - 1;
|
||||||
if ( DEBUG_RRULE ) dbg_error_log( 'RRULE', "Inserting %d from current_set into position %d", count($this->current_set), $position + 1 );
|
if ( DEBUG_RRULE ) dbg_error_log( 'RRULE', "Inserting %d from current_set into position %d", count($this->current_set), $position + 1 );
|
||||||
|
|
||||||
foreach( $this->current_set AS $k => $instance ) {
|
foreach( $this->current_set AS $k => $instance ) {
|
||||||
if ( $instance < $this->base ) continue;
|
if ( $instance < $this->base ) continue;
|
||||||
if ( isset($this->until) && $instance > $this->until ) {
|
if ( isset($this->until) && $instance > $this->until ) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user