fix for calendar recurring events bug: state of first occurence gets displayed wrong. Ralf maybe wants to review that.

This commit is contained in:
Christian Binder 2007-03-02 13:14:17 +00:00
parent 2a37b9a147
commit f6e5fcb84f

View File

@ -169,13 +169,13 @@ class socal
}
else // adjust the given recurance to the real time, it can be a date without time(!)
{
// check if the start read is the the first (default) entry of the recuring events, then it's recur_date is 0!!!
$this->db->select($this->dates_table,'MIN(cal_start) AS cal_start',array('cal_id' => $ids),__LINE__,__FILE__);
$first = $this->db->row(true);
$recur_date = $first['cal_start'] == $events[$ids]['start'] ? 0 : $events[$ids]['start'];
if ($recur_date) $events[$ids]['recur_date'] = $recur_date; // remember it, maybe we need it later, duno now
if ($recur_date)
{
// also remember recur_date, maybe we need it later, duno now
$recur_date = $events[$ids]['recur_date'] = $events[$ids]['start'];
}
}
// participants, if a recur_date give, we read that recurance, else the one users from the default entry with recur_date=0
$this->db->select($this->user_table,'*',array(
'cal_id' => $ids,