# Patches #3007: calendar - ignore notification if in past - based only on old\_event

**URL:** <https://help.egroupware.org/t/patches-3007-calendar-ignore-notification-if-in-past-based-only-on-old-event/49485>\
**Category:** eGW-tracker\
**Created:** [September 20, 2011, 1:32pm UTC](https://help.egroupware.org/t/patches-3007-calendar-ignore-notification-if-in-past-based-only-on-old-event/49485 "2011-09-20T13:32:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tracker-3](https://help.egroupware.org/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@tracker-3](https://help.egroupware.org/u/tracker-3)\
**Post date:** [September 20, 2011, 1:32pm UTC](https://help.egroupware.org/t/patches-3007-calendar-ignore-notification-if-in-past-based-only-on-old-event/49485/1 "2011-09-20T13:32:35Z")

</div>

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 &amp;&amp; !isset($to_notify[$owner]) &amp;&amp; $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 &amp;&amp; $this-&gt;date2ts($old_event['start']) &lt; ($this-&gt;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 &amp;&amp; $this-&gt;date2ts($old_event['start']) &lt; ($this-&gt;now_su - 1 * 60 * 60) &amp;&amp; $this-&gt;date2ts($new_event['start']) &lt; ($this-&gt;now_su - 1 * 60 * 60))

```

- 

```
       {

```

- 

```
           return False;

```

- 

```
       }

```

- 

```
   } else

```

- 

```
   {

```

- 

```
       if($old_event != False &amp;&amp; $this-&gt;date2ts($old_event['start']) &lt; ($this-&gt;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](https://community.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=3007&no_popup=1)
