Changeset 7350 for trunk/prototype/modules/calendar/interceptors
- Timestamp:
- 10/05/12 11:36:12 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/interceptors/Notifications.php
r7174 r7350 275 275 $data = array_merge($data, $delegatedParams); 276 276 277 self::sendMail($data, $ical, $part['user']['mail'], $subject, 'notify_response_delegated_status_body');277 self::sendMail($data, $ical, $part['user']['mail'], $subject, $schedulable['type'] == '1' ? 'notify_response_delegated_status_body' : 'notify_response_delegated_status_body_task'); 278 278 } 279 279 … … 296 296 297 297 if ($schedulable['allDay']) 298 $schedulable['endTime'] = $schedulable['endTime'] + 86400000;298 $schedulable['endTime'] = $schedulable['endTime'] + 86400000; 299 299 } 300 300 … … 365 365 */ 366 366 public static function participantCreated(&$partID, &$schedulable, $type = false, $delegatedParams = false, $organizer = false) { 367 $method = 'REQUEST'; 368 $notificationType = 'Convite de Calendario'; 369 $part = 'attendees'; 370 self::mountStruture($partID, $schedulable, $type, $data, $subject, $ical, $part, $method, $notificationType, true); 371 372 if ($delegatedParams) 373 $data = array_merge($data, $delegatedParams); 374 375 self::sendMail($data, $ical, $part['user']['mail'], $subject, !$delegatedParams ? 'notify_create_body' : 'notify_create_delegated_body', $organizer); 367 $method = 'REQUEST'; 368 $notificationType = 'Convite de Calendario'; 369 $part = 'attendees'; 370 371 if($schedulable['type'] == '2'){ 372 $template = !$delegatedParams ? 'notify_create_body_task' : 'notify_create_delegated_body_task'; 373 }else{ 374 $template = !$delegatedParams ? 'notify_create_body' : 'notify_create_delegated_body'; 375 } 376 377 self::mountStruture($partID, $schedulable, $type, $data, $subject, $ical, $part, $method, $notificationType, true); 378 379 if ($delegatedParams) 380 $data = array_merge($data, $delegatedParams); 381 382 self::sendMail($data, $ical, $part['user']['mail'], $subject, $template, $organizer); 376 383 } 377 384 … … 395 402 if ($delegatedParams) { 396 403 $data = array_merge($data, $delegatedParams); 397 $tplDelegated = 'notify_delegated_status_body';404 $tplDelegated = $schedulable['type'] == '1' ? 'notify_delegated_status_body' : 'notify_delegated_status_body_task'; 398 405 } 399 406 400 407 switch ($type) { 401 408 case STATUS_ACCEPTED: 402 $tpl = !$delegatedParams ? 'notify_accept_body' : $tplDelegated;409 $tpl = $delegatedParams ? $tplDelegated : ($schedulable['type'] == '1' ? 'notify_accept_body' : 'notify_accept_body_task'); 403 410 $subject['notificationType'] = 'Convite Aceito'; 404 411 break; 405 412 case STATUS_TENTATIVE: 406 $tpl = !$delegatedParams ? 'notify_attempt_body' : $tplDelegated;413 $tpl = $delegatedParams ? $tplDelegated :($schedulable['type'] == '1' ? 'notify_attempt_body' : 'notify_attempt_body_task'); 407 414 $subject['notificationType'] = 'Convite aceito provisoriamente'; 408 415 break; 409 416 case STATUS_CANCELLED: 410 $tpl = !$delegatedParams ? 'notify_reject_body' : $tplDelegated;417 $tpl = $delegatedParams ? $tplDelegated :($schedulable['type'] == '1' ? 'notify_reject_body' : 'notify_reject_body_task'); 411 418 $subject['notificationType'] = 'Convite rejeitado'; 412 419 break; … … 414 421 if ($delegatedParams) 415 422 $data = array_merge($data, $delegatedParams); 416 $tpl = 'notify_delegated_body';423 $tpl = $schedulable['type'] == '1' ? 'notify_delegated_body' : 'notify_delegated_body_task'; 417 424 $subject['notificationType'] = 'Convite delegado'; 418 425 break; … … 534 541 535 542 if (isset($part) && $part && count($part) > 0) 536 self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_modify_body', $from);543 self::sendMail($data, $ical, implode(',', $part), $subject, $schedulableOld['type'] == '1' ? 'notify_modify_body' : 'notify_modify_body_task', $from); 537 544 } 538 545 }
Note: See TracChangeset
for help on using the changeset viewer.