Changeset 8000 for trunk/prototype/modules
- Timestamp:
- 03/12/13 11:46:06 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/interceptors/Notifications.php
r7910 r8000 483 483 public function deleteEvent(&$uri, &$result, &$params, $original) { 484 484 $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $uri['id']), null, array('deepness' => '2')); 485 485 486 if ((Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd'], $schedulable['id']))) { 486 487 $method = 'CANCEL'; … … 490 491 491 492 if (count($part) > 0) 492 self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_cancel_body'); 493 { 494 $from = false; 495 foreach($schedulable['participants'] as $v) 496 { 497 if($v['isOrganizer'] == 1) 498 $from = $v; 499 } 500 501 self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_cancel_body' , $from ); 502 } 493 503 } 494 504 } … … 507 517 508 518 $participant = Controller::read(array('concept' => 'participant', 'id' => $uri['id']), null, array('deepness' => '1')); 509 $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $participant['schedulable']));519 $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $participant['schedulable']) , false , array('deepness' => '2')); 510 520 511 521 if ((Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd'], $schedulable['id']))) { 512 522 $method = 'CANCEL'; 513 523 $notificationType = 'Cancelamento de Calendario'; 514 $part = 'others'; 515 self::mountStruture(false, $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType); 516 517 self::sendMail($data, $ical, $participant['user']['mail'], $subject, 'notify_cancel_body'); 524 $part = 'me'; 525 self::mountStruture($schedulable['id'], $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType); 526 527 $from = false; 528 foreach($schedulable['participants'] as $v) 529 { 530 if($v['isOrganizer'] == 1) 531 $from = $v; 532 } 533 self::sendMail($data, $ical, $participant['user']['mail'], $subject, 'notify_cancel_body' , $from); 518 534 } 519 535 }
Note: See TracChangeset
for help on using the changeset viewer.