Changeset 7169 for branches


Ignore:
Timestamp:
09/05/12 08:36:07 (7 years ago)
Author:
eduardow
Message:

Ticket #3057 - Inconsistencia no remetente. Criar evento em agenda assinada.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/prototype/modules/calendar/interceptors/Notifications.php

    r6826 r7169  
    204204    } 
    205205 
     206    public static function _getAttendeeOrganizer($schedulable) {  
     207        foreach ($schedulable['participants'] as $v)  
     208            if ($v['isOrganizer'] == '1')  
     209                return $v;  
     210    }  
     211 
    206212    /** 
    207213     * Prepara para criação de email de delegação 
     
    332338                $data['participants'] = '<UL> '; 
    333339                foreach ($schedulable['participants'] as $ii => $participant) { 
    334                     if (Config::me('mail') !== $participant['user']['mail']) 
     340                    if ($participant['isOrganizer'] != '1') 
    335341                        $part[] = $participant['user']['mail']; 
    336342 
     
    519525            } 
    520526 
    521         if (($alt === true) && (Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd'], $schedulable['id']))) { 
    522             $method = 'REQUEST'; 
    523             $notificationType = 'Modificação de Calendario'; 
    524             $part = 'othersAttendees'; 
    525             self::mountStruture($uri['id'], $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType); 
    526  
    527             if (isset($part) && $part && count($part) > 0) 
    528                 self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_modify_body'); 
    529         } 
     527        if (($alt === true) && (Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd'], $schedulable['id']))) {  
     528        $method = 'REQUEST';  
     529        $notificationType = 'Modificação de Calendario';  
     530        $part = 'othersAttendees';  
     531        self::mountStruture($uri['id'], $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);  
     532 
     533        $from = self::_getAttendeeOrganizer($schedulable);  
     534 
     535        if (isset($part) && $part && count($part) > 0)  
     536            self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_modify_body', $from);  
     537    }  
    530538    } 
    531539 
Note: See TracChangeset for help on using the changeset viewer.