From d204144ea3f400417a045bc9adb2c0d369592997 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 23 Jan 2008 07:40:09 +0000 Subject: [PATCH] old dates could not be updated, so we fixed that. --- calendar/inc/class.socal.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.socal.inc.php b/calendar/inc/class.socal.inc.php index 969c34bde0..0f096c720b 100644 --- a/calendar/inc/class.socal.inc.php +++ b/calendar/inc/class.socal.inc.php @@ -514,14 +514,14 @@ ORDER BY cal_user_type, cal_usre_id // while saving handle the etag as condition for the update, to check if an entry was saved before this action occured $check_etag = ($check_modified ? $check_modified : $event['cal_etag']); - if ($cal_id) + if ($cal_id && $check_etag) { $event['cal_etag']=$check_etag+1; $event['cal_edit_user']=NULL; $event['cal_edit_time']=NULL; // cal_etag will be set on first save (if not set) - $where = array('cal_id' => $cal_id,'cal_etag'=>$check_etag); + $where = array('cal_id' => $cal_id,'cal_etag is NULL or cal_etag='.$check_etag); #if ($check_etag) $where['cal_etag'] = $check_etag; if (!$this->db->update($this->cal_table,$event,$where,__LINE__,__FILE__)) { @@ -536,7 +536,7 @@ ORDER BY cal_user_type, cal_usre_id } } else { - $event['cal_etag']=$check_modified; + $event['cal_etag']=($check_etag?$check_etag:1); } if ($cal_id)