source: trunk/prototype/modules/calendar/interceptors/Notifications.php @ 6027

Revision 6027, 21.2 KB checked in by acoutinho, 12 years ago (diff)

Ticket #2653 - Inconsistencia na atualizacao de eventos

Line 
1<?php
2
3require_once ROOTPATH . '/modules/calendar/constants.php';
4require_once ROOTPATH . '/modules/calendar/interceptors/Helpers.php';
5require_once ROOTPATH . '/plugins/icalcreator/iCalcreator.class.php';
6require_once ROOTPATH . '/api/parseTPL.php';
7
8class Notifications extends Helpers {
9
10    public function formatNotification(&$uri, &$params, &$data, $original) {
11        switch ($params['type']) {
12            case 'suggestion':
13                self::formatSuggestion($params);
14                break;
15            case 'suggestionResponse':
16                self::formatSuggestionResponse($params);
17                break;
18        }
19    }
20
21    /**
22     * Analisa o commit do conceito participant e encaminha cada participant para seu devido metodo de notrificação
23     *
24     * @license    http://www.gnu.org/copyleft/gpl.html GPL
25     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
26     * @sponsor    Caixa Econômica Federal
27     * @author     Cristiano Corrêa Schmidt
28     * @return     void
29     * @access     public
30     */
31    public function commitParticipant(&$uri, &$result, &$data, $original) {
32        if (Config::regGet('noAlarm') !== false)
33            return; //Escapa notificações caso a flag de noAlarm esteja ativa.
34
35        $organizers = array(); //Cache Organizadores
36        $schedulables = array(); //Cache Schedulables
37
38        foreach ($data as $i => $concept) {
39            if ($concept['concept'] === 'participant') {
40                if ($concept['method'] == 'create')
41                    $created[] = $concept['id'];
42                else if ($concept['method'] == 'update')
43                    $updated[] = $concept['id'];
44            }
45            else if ($concept['concept'] === 'schedulable') { //Caso exista schedulable no commit antecipa o carregamento do owner
46                $schedulables[$concept['id']] = Controller::read(array('concept' => 'schedulable', 'id' => $concept['id']), false, array('deepness' => '2'));
47                foreach ($schedulables[$concept['id']]['participants'] as $i => $v) //salva em $organizers as informações do organizador     
48                    if (($v['isOrganizer'] === '1') && ($organizers[$concept['id']] = $v))
49                        break;
50            }else if ($concept['concept'] === 'schedulableToAttachment') {
51                $relationAttachment = Controller::find(array('concept' => 'schedulableToAttachment'), false, array('filter' => array('=', 'id', $concept['id'])));
52
53
54
55                foreach ($relationAttachment as $key => $value) {
56                    if (!array_key_exists('attachments', $schedulables[$value['schedulable']]))
57                        $schedulables[$value['schedulable']]['attachments'] = array();
58
59                    $temp = Controller::find(array('concept' => 'attachment'), false, array('filter' => array('=', 'id', $value['attachment'])));
60                    array_push($schedulables[$value['schedulable']]['attachments'], $temp[0]);
61                }
62            }
63        }
64
65        if (isset($created)) {
66            $psCreated = Controller::find(array('concept' => 'participant'), false, array('deepness' => '1', 'filter' => array('IN', 'id', $created)));
67            foreach ($psCreated as $i => $pCreated) {
68                if ($pCreated['isOrganizer'] == '1')
69                    continue; //escapa organizador
70                $schedulable = isset($schedulables[$pCreated['schedulable']]) ? $schedulables[$pCreated['schedulable']] : Controller::read(array('concept' => 'schedulable', 'id' => $pCreated['schedulable']), false, array('deepness' => '2'));
71                if (!self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd']))
72                    continue; //Escapa eventos do passado
73
74                $organizer = isset($organizers[$pCreated['schedulable']]) ? $organizers[$pCreated['schedulable']] : self::getOrganizer($pCreated['schedulable']);
75
76                if ($pCreated['delegatedFrom'] != 0) {
77                    self::participantDelegated($pCreated, $schedulable, $organizer);
78                    continue;
79                }
80
81                switch ($pCreated['status']) {
82                    case STATUS_CONFIRMED:
83                        self::participantStatusChange($pCreated['id'], $schedulable, $organizer, STATUS_ACCEPTED);
84                        break;
85                    case STATUS_UNANSWERED:
86                        self::participantCreated($pCreated['id'], $schedulable, false, false, $organizer);
87                        break;
88                }
89            }
90        }
91
92        if (isset($updated)) {
93            $psUpdated = Controller::find(array('concept' => 'participant'), false, array('deepness' => '1', 'filter' => array('IN', 'id', $updated)));
94            foreach ($psUpdated as $i => $pUpdated) {
95                if ($pUpdated['isOrganizer'] == '1')
96                    continue; //escapa organizador
97                $schedulable = isset($schedulables[$pUpdated['schedulable']]) ? $schedulables[$pUpdated['schedulable']] : Controller::read(array('concept' => 'schedulable', 'id' => $pUpdated['schedulable']), false, array('deepness' => '2'));
98                if (!self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd']))
99                    continue; //Escapa eventos do passado
100
101                foreach ($schedulable['participants'] as $i => $v) //salva em $organizer as informações do organizador     
102                    if (($v['isOrganizer'] === '1') && ($organizer = $v))
103                        break;
104
105                if ($pUpdated['delegatedFrom'] != 0) {
106                    self::participantDelegatedStatusChange($pUpdated, $schedulable, $organizer, $pUpdated['status']);
107                } else if ($pUpdated['status'] != STATUS_UNANSWERED && $pUpdated['status'] != STATUS_DELEGATED)
108                    self::participantStatusChange($pUpdated['id'], $schedulable, $organizer, $pUpdated['status']);
109            }
110        }
111    }
112
113    public function formatSuggestion(&$params) {
114
115        $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $params['schedulable']), null, array('deepness' => '2'));
116
117        foreach ($schedulable['participants'] as $i => $v) //salva em $organizer as informações do organizador     
118            if (($v['isOrganizer'] === '1') && ($organizer = $v))
119                break;
120
121        $method = 'COUNTER';
122        $notificationType = 'Sugestão de horário';
123        $part = 'other';
124
125        $schedulableReference = $schedulable;
126
127        $referenceSuggestion = array('startTime' => $params['startTime'],
128            'endTime' => $params['endTime'],
129            'allDay' => $params['allDay']
130        );
131        $schedulable = array_merge($schedulable, $referenceSuggestion);
132
133        self::mountStruture(false, $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);
134
135
136        $timezone = new DateTimeZone('UTC');
137        $sTime = new DateTime('@' . (int) ($schedulableReference['startTime'] / 1000), $timezone);
138        $eTime = new DateTime('@' . (int) ($schedulableReference['endTime'] / 1000), $timezone);
139
140        if (isset($schedulableReference['timezone'])) {
141            $sTime->setTimezone(new DateTimeZone($schedulableReference['timezone']));
142            $eTime->setTimezone(new DateTimeZone($schedulableReference['timezone']));
143        }
144
145        $data['nowStartDate'] = date_format($sTime, 'd/m/Y');
146        $data['nowStartTime'] = ($schedulableReference['allDay']) ? '' : date_format($sTime, 'H:i');
147        $data['nowEndDate'] = date_format($eTime, 'd/m/Y');
148        $data['nowEndTime'] = ($schedulableReference['allDay']) ? '' : date_format($eTime, 'H:i');
149        $data['userRequest'] = Config::me('uid');
150
151        $ical2 = $ical;
152        $ical2['type'] = 'text/calendar';
153        $ical2['name'] = 'thunderbird.ics';
154        $params['attachments'][] = $ical2;
155        $params['attachments'][] = $ical;
156        $params['isHtml'] = true;
157        $params['body'] = parseTPL::load_tpl($data, ROOTPATH . '/modules/calendar/templates/notify_suggestion_body.tpl');
158        $params['subject'] = parseTPL::load_tpl($subject, ROOTPATH . '/modules/calendar/templates/notify_subject.tpl');
159        ;
160        $params['from'] = '"' . Config::me('cn') . '" <' . Config::me('mail') . '>';
161        $params['to'] = $organizer['user']['mail'];
162    }
163
164    public function formatSuggestionResponse(&$params) {
165        $schedulable = $params['schedulable'];
166        foreach ($schedulable['participants'] as $i => $v) {//salva em $organizer as informações do organizador     
167            if ($v['isOrganizer'] === '1')
168                $organizer = $v;
169            if ($v['user']['mail'] == Config::me('mail'))
170                $me = $v;
171        }
172        $method = 'DECLINECOUNTER';
173        $notificationType = 'Sugestão de horário';
174        $part = 'other';
175
176        $schedulable['participants'] = array();
177        array_push($schedulable['participants'], $me, $organizer);
178
179        self::mountStruture(false, $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);
180
181        if ($params['status'] == 'DECLINECOUNTER')
182            $data['status'] = 'não pode ser aceito';
183        $ical2 = $ical;
184        $ical2['type'] = 'text/calendar';
185        $ical2['name'] = 'thunderbird.ics';
186        $params['attachments'][] = $ical2;
187        $params['attachments'][] = $ical;
188        $params['isHtml'] = true;
189        $params['body'] = parseTPL::load_tpl($data, ROOTPATH . '/modules/calendar/templates/notify_suggestion_response_body.tpl');
190        $params['subject'] = parseTPL::load_tpl($subject, ROOTPATH . '/modules/calendar/templates/notify_subject.tpl');
191        ;
192        $params['to'] = $params['from'];
193        $params['from'] = $params['from'] = '"' . Config::me('cn') . '" <' . Config::me('mail') . '>';
194    }
195
196    public static function _getAttendeeById($attendeId, $schedulable) {
197        foreach ($schedulable['participants'] as $id => $dv)
198            if ($dv['id'] == $attendeId)
199                return $dv;
200    }
201
202    /**
203     * Prepara para criação de email de delegação
204     *
205     * @license    http://www.gnu.org/copyleft/gpl.html GPL
206     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
207     * @sponsor    Caixa Econômica Federal
208     * @author     Adriano Coutinho da Silva
209     * @return     void
210     * @access     public
211     */
212    public static function participantDelegated(&$partID, &$schedulable, &$organizer) {
213
214        $delegatedParams = array();
215
216        $delegatedFrom = self::_getAttendeeById($partID['delegatedFrom'], $schedulable);
217        $delegatedParams['delegatedFrom'] = $delegatedFrom['user']['uid'];
218
219        self::participantCreated($partID['id'], $schedulable, STATUS_DELEGATED, $delegatedParams);
220
221        $delegatedTo = self::_getAttendeeById($partID['id'], $schedulable);
222        $delegatedParams['delegated'] = $delegatedTo['user']['uid'];
223
224        self::participantStatusChange($partID['delegatedFrom'], $schedulable, $organizer, STATUS_DELEGATED, $delegatedParams);
225    }
226
227    /**
228     * Monta o email de resposta que sera enviado ao delegatedFrom
229     *
230     * @license    http://www.gnu.org/copyleft/gpl.html GPL
231     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
232     * @sponsor    Caixa Econômica Federal
233     * @author     Cristiano Corrêa Schmidt
234     * @return     void
235     * @access     public
236     */
237    public static function participantDelegatedStatusChange(&$partID, &$schedulable, $organizer, &$type = false) {
238
239        $delegatedParams = array();
240
241        $delegated = self::_getAttendeeById($partID['id'], $schedulable);
242        $delegatedParams['delegated'] = $delegated['user']['uid'];
243
244        switch ($partID['status']) {
245            case STATUS_ACCEPTED:
246                $delegatedParams['status'] = 'aceitou';
247                break;
248            case STATUS_TENTATIVE:
249                $delegatedParams['status'] = 'marcou como tentativa';
250                break;
251            case STATUS_CANCELLED:
252                $delegatedParams['status'] = 'rejeitou';
253                break;
254            case STATUS_DELEGATED:
255                $delegatedParams['status'] = 'delegou para um novo participante';
256                break;
257        }
258        //notifica o organizador a resposta do delegado
259        self::participantStatusChange($partID['delegatedFrom'], $schedulable, $organizer, $type, $delegatedParams);
260
261        $method = 'REQUEST';
262        $notificationType = 'Resposta Delegação';
263        $part = 'attendees';
264        self::mountStruture($partID['delegatedFrom'], $schedulable, $type, $data, $subject, $ical, $part, $method, $notificationType);
265
266        $data = array_merge($data, $delegatedParams);
267
268        self::sendMail($data, $ical, $part['user']['mail'], $subject, 'notify_response_delegated_status_body');
269    }
270
271    public static function mountStruture($partID, &$schedulable, $type = false, &$data, &$subject, &$ical, &$part = false, &$method, &$notificationType, $regSet = false) {
272
273        if ((Config::regGet('ical://' . $schedulable['id'] . '/' . $method) === false) || ($method == 'CANCEL')) { //Verifica se o ical ja não esta no reg
274            $schedulable['URI']['concept'] = 'schedulable';
275            $ical['source'] = Controller::format(array('service' => 'iCal'), array($schedulable), array('method' => $method));
276            $ical['type'] = 'text/plain';
277            $ical['name'] = 'outlook.ics';
278            if ($regSet)
279                Config::regSet('ical://' . $schedulable['id'] . '/' . $method, $ical);
280        }
281        else
282            $ical = Config::regGet('ical://' . $schedulable['id'] . '/' . $method);
283
284        $timezone = new DateTimeZone('UTC');
285        $sTime = new DateTime('@' . (int) ($schedulable['startTime'] / 1000), $timezone);
286        $eTime = new DateTime('@' . (int) ($schedulable['endTime'] / 1000), $timezone);
287
288        if (isset($schedulable['timezone'])) {
289            $sTime->setTimezone(new DateTimeZone($schedulable['timezone']));
290            $eTime->setTimezone(new DateTimeZone($schedulable['timezone']));
291        }
292
293        $data = array('startDate' => date_format($sTime, 'd/m/Y'),
294            'startTime' => ($schedulable['allDay']) ? '' : date_format($sTime, 'H:i'),
295            'endDate' => date_format($eTime, 'd/m/Y'),
296            'endTime' => ($schedulable['allDay']) ? '' : date_format($eTime, 'H:i'),
297            'eventTitle' => $schedulable['summary'],
298            'eventLocation' => $schedulable['location'],
299            'timezone' => ($schedulable['timezone']) ? $schedulable['timezone'] : 'UTC');
300        $temp = $part;
301        $part = false;
302
303        switch ($temp) {
304            case 'attendees':
305                $attList = '<UL> ';
306                foreach ($schedulable['participants'] as $i => $v) {
307                    if ($part === false && $v['id'] == $partID)
308                        $part = $v;
309
310                    $attList .= ' <LI> ' . (isset($v['user']['name']) ? $v['user']['name'] : $v['user']['mail']);
311                }
312                $attList .= '</UL>';
313                $data['participants'] = $attList;
314                break;
315            case 'me':
316                $part = self::_getAttendeeById($partID, $schedulable);
317                $data['participant'] = isset($part['user']['name']) ? $part['user']['name'] : $part['user']['mail'];
318                break;
319            case 'othersAttendees':
320                $data['participants'] = '<UL> ';
321                foreach ($schedulable['participants'] as $ii => $participant) {
322                    if (Config::me('mail') !== $participant['user']['mail'])
323                        $part[] = $participant['user']['mail'];
324
325                    $data['participants'] .= ' <LI> ' . (isset($participant['user']['name']) ? $participant['user']['name'] : $participant['user']['mail']);
326                }
327                break;
328        }
329        $subject['notificationType'] = $notificationType;
330        $subject['eventTitle'] = mb_convert_encoding($schedulable['summary'], 'ISO-8859-1', 'ISO-8859-1,UTF-8');
331        $subject['startDate'] = date_format($sTime, 'd/m/Y');
332        $subject['startTime'] = ($schedulable['allDay']) ? '' : date_format($sTime, 'H:i');
333        $subject['endDate'] = date_format($eTime, 'd/m/Y');
334        $subject['endTime'] = ($schedulable['allDay']) ? '' : date_format($eTime, 'H:i');
335        $subject['participant'] = Config::me('uid');
336    }
337
338    /**
339     * Monta o email de convite que sera enviado ao participant
340     *
341     * @license    http://www.gnu.org/copyleft/gpl.html GPL
342     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
343     * @sponsor    Caixa Econômica Federal
344     * @author     Cristiano Corrêa Schmidt
345     * @return     void
346     * @access     public
347     */
348    public static function participantCreated(&$partID, &$schedulable, $type = false, $delegatedParams = false, $organizer = false) {
349        $method = 'REQUEST';
350        $notificationType = 'Convite de Calendario';
351        $part = 'attendees';
352        self::mountStruture($partID, $schedulable, $type, $data, $subject, $ical, $part, $method, $notificationType, true);
353
354        if ($delegatedParams)
355            $data = array_merge($data, $delegatedParams);
356
357        self::sendMail($data, $ical, $part['user']['mail'], $subject, !$delegatedParams ? 'notify_create_body' : 'notify_create_delegated_body', $organizer);
358    }
359
360    /**
361     * Monta o email de aceito que sera enviado ao organizador
362     *
363     * @license    http://www.gnu.org/copyleft/gpl.html GPL
364     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
365     * @sponsor    Caixa Econômica Federal
366     * @author     Cristiano Corrêa Schmidt
367     * @return     void
368     * @access     public
369     */
370    public static function participantStatusChange(&$partID, &$schedulable, &$organizer, $type, $delegatedParams = false) {
371        $method = 'REPLY';
372        $notificationType = 'Convite Aceito';
373        $part = 'me';
374
375        self::mountStruture($partID, $schedulable, $type, $data, $subject, $ical, $part, $method, $notificationType, true);
376
377        if ($delegatedParams) {
378            $data = array_merge($data, $delegatedParams);
379            $tplDelegated = 'notify_delegated_status_body';
380        }
381
382        switch ($type) {
383            case STATUS_ACCEPTED:
384                $tpl = !$delegatedParams ? 'notify_accept_body' : $tplDelegated;
385                $subject['notificationType'] = 'Convite Aceito';
386                break;
387            case STATUS_TENTATIVE:
388                $tpl = !$delegatedParams ? 'notify_attempt_body' : $tplDelegated;
389                $subject['notificationType'] = 'Convite  aceito provisoriamente';
390                break;
391            case STATUS_CANCELLED:
392                $tpl = !$delegatedParams ? 'notify_reject_body' : $tplDelegated;
393                $subject['notificationType'] = 'Convite rejeitado';
394                break;
395            case STATUS_DELEGATED:
396                if ($delegatedParams)
397                    $data = array_merge($data, $delegatedParams);
398                $tpl = 'notify_delegated_body';
399                $subject['notificationType'] = 'Convite delegado';
400                break;
401        }
402
403        self::sendMail($data, $ical, $organizer['user']['mail'], $subject, $tpl, false);
404    }
405
406    /**
407     * Monta o body e envia o email
408     *
409     * @license    http://www.gnu.org/copyleft/gpl.html GPL
410     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
411     * @sponsor    Caixa Econômica Federal
412     * @author     Cristiano Corrêa Schmidt
413     * @return     void
414     * @access     public
415     */
416    private static function sendMail(&$data, &$ical, $to, &$subject, $template, $from = false) {
417        $ical2 = $ical;
418        $ical2['type'] = 'text/calendar';
419        $ical2['name'] = 'thunderbird.ics';
420        $mail['attachments'][] = $ical2;
421        $mail['attachments'][] = $ical;
422        $mail['isHtml'] = true;
423        $mail['body'] = parseTPL::load_tpl($data, ROOTPATH . '/modules/calendar/templates/' . $template . '.tpl');
424        $mail['subject'] = parseTPL::load_tpl($subject, ROOTPATH . '/modules/calendar/templates/notify_subject.tpl');
425        ;
426        $mail['from'] = $from ? ('"' . $from['user']['name'] . '" <' . $from['user']['mail'] . '>') : ('"' . Config::me('cn') . '" <' . Config::me('mail') . '>');
427        $mail['to'] = $to;
428        Controller::create(array('service' => 'SMTP'), $mail);
429    }
430
431    /**
432     * Monta o email de cancelado que sera enviado a todos os participantes
433     *
434     * @license    http://www.gnu.org/copyleft/gpl.html GPL
435     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
436     * @sponsor    Caixa Econômica Federal
437     * @author     Cristiano Corrêa Schmidt
438     * @return     void
439     * @access     public
440     */
441    public function deleteEvent(&$uri, &$result, &$params, $original) {
442        $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $uri['id']), null, array('deepness' => '2'));
443        if ((Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd']))) {
444            $method = 'CANCEL';
445            $notificationType = 'Cancelamento de Calendario';
446            $part = 'othersAttendees';
447            self::mountStruture($uri['id'], $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);
448
449            if (count($part) > 0)
450                self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_cancel_body');
451        }
452    }
453
454    /**
455     * Monta o email de cancelado que sera enviado ao participant deleteado
456     *
457     * @license    http://www.gnu.org/copyleft/gpl.html GPL
458     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
459     * @sponsor    Caixa Econômica Federal
460     * @author     Cristiano Corrêa Schmidt
461     * @return     void
462     * @access     public
463     */
464    public function deleteParticipant(&$uri, &$result, &$params, $original) {
465
466        $participant = Controller::read(array('concept' => 'participant', 'id' => $uri['id']), null, array('deepness' => '1'));
467        $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $participant['schedulable']));
468
469        if ((Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd']))) {
470            $method = 'CANCEL';
471            $notificationType = 'Cancelamento de Calendario';
472            $part = 'others';
473            self::mountStruture(false, $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);
474
475            self::sendMail($data, $ical, $participant['user']['mail'], $subject, 'notify_cancel_body');
476        }
477    }
478
479    /**
480     * Faz um diff do update se ouve realmente uma alteração envia um email a todos os participants
481     *
482     * @license    http://www.gnu.org/copyleft/gpl.html GPL
483     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
484     * @sponsor    Caixa Econômica Federal
485     * @author     Cristiano Corrêa Schmidt
486     * @return     void
487     * @access     public
488     */
489    public function updateEvent(&$uri, &$params, &$criteria, $original) {
490        $schedulableOld = Controller::read(array('concept' => 'schedulable', 'id' => $uri['id']), null, array('deepness' => '2'));
491        $schedulable = $schedulableOld;
492        $alt = false;
493
494        foreach ($params as $i => $v) //Verifica se ouve alteração no evento
495            if (isset($schedulableOld[$i]) && $schedulableOld[$i] != $v && $i != 'participants') {
496                $schedulable[$i] = $v;
497                $alt = true;
498            }
499
500        if (($alt === true) && (Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd']))) {
501            $method = 'REQUEST';
502            $notificationType = 'Modificação de Calendario';
503            $part = 'othersAttendees';
504            self::mountStruture($uri['id'], $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);
505
506            if (isset($part) && $part && count($part) > 0)
507                self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_modify_body');
508        }
509    }
510
511}
512
513?>
Note: See TracBrowser for help on using the repository browser.