fixing a possible Problem in save_edit_user. This should be it now

This commit is contained in:
Klaus Leithoff 2008-01-24 10:13:00 +00:00
parent fc6216fd78
commit 50ff47def7

View File

@ -1163,11 +1163,11 @@ ORDER BY cal_user_type, cal_usre_id
unset($event2update[$col]);
}
}
if ($cal_id && $event2update['cal_edit_user'] && $event2update['cal_edit_time'])
{
$locktime = ($GLOBALS['egw_info']['server']['Lock_Time_Calender'] ? $GLOBALS['egw_info']['server']['Lock_Time_Calender'] : 1);
$where = array('cal_id' => $cal_id,'cal_edit_user is NULL or cal_edit_time<'.$event2update['cal_edit_time']-$locktime);
$lockborder=$event2update['cal_edit_time']-$locktime;
$where = array('cal_id' => $cal_id,'(cal_edit_user is NULL or cal_edit_time<'.$lockborder.')');
if (!$this->db->update($this->cal_table,$event2update,$where,__LINE__,__FILE__))
{
//error_log("### socal::write(".print_r($event,true).") where=".print_r($where,true)." returning false");