diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index a6a51d9cc4..410fb29d2a 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -1536,10 +1536,12 @@ ORDER BY cal_user_type, cal_usre_id $this->db->delete($table, array('cal_id'=>$row['cal_id']), __LINE__, __FILE__, 'calendar'); } // handle sync - $this->db->query('UPDATE egw_api_content_history - SET sync_deleted=NOW() - WHERE sync_appname = \'calendar\' - AND sync_contentid ='.$row['cal_id'], __LINE__, __FILE__); + $this->db->update('egw_api_content_history',array( + 'sync_deleted' => time(), + ),array( + 'sync_appname' => 'calendar', + 'sync_contentid' => $row['cal_id'], // sync_contentid is varchar(60)! + ), __LINE__, __FILE__); // handle links egw_link::unlink('', 'calendar', $row['cal_id']); }