diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index a6525236b1..15b6901709 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -364,7 +364,6 @@ class calendar_boupdate extends calendar_bo else // update existing event { $this->check4update($event,$old_event); - } // notify the link-class about the update, as other apps may be subscribt to it egw_link::notify_update('calendar',$cal_id,$event); @@ -434,9 +433,11 @@ class calendar_boupdate extends calendar_bo * * @param array $new_event the updated event * @param array $old_event the event before the update + * @todo check if there is a real change, not assume every save is a change */ function check4update($new_event,$old_event) { + //error_log(__METHOD__."($new_event[title])"); $modified = $added = $deleted = array(); //echo "

calendar_boupdate::check4update() new participants = ".print_r($new_event['participants'],true).", old participants =".print_r($old_event['participants'],true)."

\n"; @@ -504,12 +505,9 @@ class calendar_boupdate extends calendar_bo switch($ru = $part_prefs['calendar']['receive_updates']) { case 'responses': - if ($msg_is_response) - { - ++$want_update; - } + ++$want_update; case 'modifications': - if ($msg_type == MSG_MODIFIED) + if (!$msg_is_response) { ++$want_update; } @@ -532,7 +530,7 @@ class calendar_boupdate extends calendar_bo case 'no': break; } - //echo "

calendar_boupdate::update_requested(user=$userid,pref=".$part_prefs['calendar']['receive_updates'] .",msg_type=$msg_type,".($old_event?$old_event['title']:'False').",".($old_event?$old_event['title']:'False').") = $want_update

\n"; + //error_log(__METHOD__."(userid=$userid,,msg_type=$msg_type,...) msg_is_response=$msg_is_response, want_update=$want_update"); return $want_update > 0; } @@ -548,7 +546,7 @@ class calendar_boupdate extends calendar_bo */ function send_update($msg_type,$to_notify,$old_event,$new_event=null,$user=0) { - //echo "

".__METHOD__."($msg_type,".array2string($to_notify).",,$new_event[title],$user)

\n"; + //error_log(__METHOD__."($msg_type,".array2string($to_notify).",...)"); if (!is_array($to_notify)) { $to_notify = array();