From ce35264ed93c254af093d405aa9599d44289f1f7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 10 Sep 2010 07:01:41 +0000 Subject: [PATCH] fix for postgreSQL bug reported by Anthony Messina (amessina-at-messinet.com): sync_contentid is varchar(60) and needs explicit cast, fixed by letting egw_db do the quoting, which is more save anyway --- calendar/inc/class.calendar_so.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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']); }