|
From: <tr...@eg...> - 2011-09-20 13:32:45
|
Ticket modified by camel camel at 2011/09/20 15:32
Tracking SystemPatches
CategoryCalendar
VersionTrunk
StatusOpen
ResolutionAccepted
Completed0%
Priority5 - medium
Created bycamel camel
Created on2011/07/12 23:56
Assigned toRalf Becker
Summary#3007 - calendar - ignore notification if in past - based only on old_event
the problem is the 10 seconds tolerance is only based on start time of old_event. but happen, if the old start time is on past and it will be moved to future time ? -> then it wouldn'Tbe notifiy ... therefore i made an extra ceck ..
(i used here 1 hour in past to check)
###############################################################
class.calendar_boupdate.inc.php [----] 0 L:[601+28 629/2525] *(22745/82349b) 0009 0x009
function send_update($msg_type,$to_notify,$old_event,$new_event=null,$user=0)
{
//error_log(__METHOD__."($msg_type,".array2string($to_notify).",...)");
if (!is_array($to_notify))
{
$to_notify = array();
}
$disinvited = $msg_type == MSG_DISINVITE ? array_keys($to_notify) : array();
$owner = $old_event ? $old_event['owner'] : $new_event['owner'];
if ($owner && !isset($to_notify[$owner]) && $msg_type != MSG_ALARM)
{
$to_notify[$owner] = 'owner'; // always include the event-owner
}
$version = $GLOBALS['egw_info']['apps']['calendar']['version'];
- // ignore events in the past (give a tolerance of 10 seconds for the script)
- if($old_event != False && $this->date2ts($old_event['start']) < ($this->now_su - 10))
- {
- return False;
- }
+ //camel - start - ignore events in the past (give a tolerance of 1 hour) 1hour in past - also remind
+ if($new_event != False)
+ {
+ if($old_event != False && $this->date2ts($old_event['start']) < ($this->now_su - 1 * 60 * 60) && $this->date2ts($new_event['start']) < ($this->now_su - 1 * 60 * 60))
+ {
+ return False;
+ }
+ } else
+ {
+ if($old_event != False && $this->date2ts($old_event['start']) < ($this->now_su - 1 * 60 * 60))
+ {
+ return False;
+ }
+ }
$temp_user = $GLOBALS['egw_info']['user']; // save user-date of the enviroment to restore it after
Comment by camel camel at 2011/09/20 15:32:
correct, it is more a feature request, and as i did it...
thanks for moving ...
Comment by Birgit Becker at 2011/09/20 14:00:
Hi Camel,
i do not think that this is really a bug, its more a feature/patch for not getting notified about changes in events which are already done ...
So i switch that to queue patches
There is in trunk now also the possibility to switch on a flag/checkbox for calendar to "do not notify". I don't think that we will change here anything in general.
Birgit
Linked entries:
https://community.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=3007&no_popup=1
|