Changeset 7163


Ignore:
Timestamp:
09/04/12 15:08:21 (8 years ago)
Author:
acoutinho
Message:

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

Location:
trunk/prototype/modules/calendar
Files:
2 edited

Legend:

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

    r6791 r7163  
    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 
     
    515521        foreach ($params as $i => $v) //Verifica se ouve alteração no evento 
    516522            if (isset($schedulableOld[$i]) && $schedulableOld[$i] != $v && $i != 'participants') { 
    517                 $schedulable[$i] = $v; 
    518                 $alt = true; 
     523                $schedulable[$i] = $v; 
     524                $alt = true; 
    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 
    532540    static private function parseTimeDate($time, $timezone) { 
    533         return strtotime($time . ' ' . $timezone) . '000'; 
     541        return strtotime($time . ' ' . $timezone) . '000'; 
    534542    } 
    535543 
  • trunk/prototype/modules/calendar/js/init.js

    r7106 r7163  
    483483                        }else{ 
    484484                            var schedulable = DataLayer.get( "schedulable", evt.id); 
    485                             schedulable.group = evt.calendar; 
     485                            schedulable.calendar = evt.calendar; 
    486486                            eventDetails( schedulable, true); 
    487487                            } 
Note: See TracChangeset for help on using the changeset viewer.