"make storing of cf's aware of arrays

Thanks to Hans-Jürgen Tappe"
This commit is contained in:
Ralf Becker 2009-09-27 07:59:01 +00:00
parent 42d898da8c
commit f855b57683

View File

@ -685,10 +685,10 @@ ORDER BY cal_user_type, cal_usre_id
{ {
if ($name[0] == '#') if ($name[0] == '#')
{ {
if (strlen($value)) if ($value)
{ {
$this->db->insert($this->extra_table,array( $this->db->insert($this->extra_table,array(
'cal_extra_value' => $value, 'cal_extra_value' => is_array($value) ? implode(',',$value) : $value,
),array( ),array(
'cal_id' => $cal_id, 'cal_id' => $cal_id,
'cal_extra_name' => substr($name,1), 'cal_extra_name' => substr($name,1),
@ -895,7 +895,7 @@ ORDER BY cal_user_type, cal_usre_id
{ {
$where[] = '(cal_recur_date=0 OR cal_recur_date >= '.(int)$change_since.')'; $where[] = '(cal_recur_date=0 OR cal_recur_date >= '.(int)$change_since.')';
} }
if ($change_since !== false) // update existing entries if ($change_since !== false) // update existing entries
{ {
$existing_entries = $this->db->select($this->user_table,'DISTINCT cal_user_type,cal_user_id',$where,__LINE__,__FILE__,false,'','calendar'); $existing_entries = $this->db->select($this->user_table,'DISTINCT cal_user_type,cal_user_id',$where,__LINE__,__FILE__,false,'','calendar');
@ -940,7 +940,7 @@ ORDER BY cal_user_type, cal_usre_id
$this->db->delete($this->user_table,$where + array('('.implode(' OR ',$to_or).')'),__LINE__,__FILE__,'calendar'); $this->db->delete($this->user_table,$where + array('('.implode(' OR ',$to_or).')'),__LINE__,__FILE__,'calendar');
} }
} }
if (count($participants)) // participants which need to be added if (count($participants)) // participants which need to be added
{ {
// find all recurrences, as they all need the new parts to be added // find all recurrences, as they all need the new parts to be added