Fix computation of new COUNT value for recurrence rules

This commit is contained in:
Thomas Bruederli 2012-10-30 16:10:12 +01:00
parent 9d9262d71f
commit 075748b076

View file

@ -315,7 +315,7 @@ class database_driver extends calendar_driver
// if recurrence COUNT, update value to the correct number of future occurences // if recurrence COUNT, update value to the correct number of future occurences
if ($event['recurrence']['COUNT']) { if ($event['recurrence']['COUNT']) {
$fromdate = clone $master['start']; $fromdate = clone $event['start'];
$fromdate->setTimezone($this->server_timezone); $fromdate->setTimezone($this->server_timezone);
$sqlresult = $this->rc->db->query(sprintf( $sqlresult = $this->rc->db->query(sprintf(
"SELECT event_id FROM " . $this->db_events . " "SELECT event_id FROM " . $this->db_events . "