Ignore:
Timestamp:
07/24/12 10:32:47 (12 years ago)
Author:
marcosw
Message:

Ticket #2955 - Merge do branch das novas funcionalidades para o trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/services/iCal.php

    r6807 r6861  
    572572                                $interation['schedulable://' . $schedulable['id']] = false; 
    573573                            break; 
    574  
     574                                 
    575575                        case 'ADD': 
    576576                            break; 
     
    720720 
    721721                        case 'REPLY': 
    722                             $interation = ICAL_ACTION_REPLY; 
     722                                if ($schedulable = self::_getSchedulable($uid)) { 
     723                                        while ($property = $component->getProperty('attendee', FALSE, TRUE)) 
     724                                            if ($attendee = self::_getParticipantByMail(str_replace('MAILTO:', '', $property['value']), $schedulable['participants'], true)) 
     725                                                        $interation = (constant('STATUS_' . strtoupper($property['params']['PARTSTAT'])) == $attendee['status']) ?  ICAL_ACTION_NONE : ICAL_ACTION_REPLY; 
     726                            }else 
     727                                $interation = ICAL_NOT_FOUND; 
    723728                            break; 
    724729 
     
    810815     
    811816     
    812     private static function _getParticipantByMail($mail, &$participants) { 
     817    private static function _getParticipantByMail($mail, &$participants, $isFull) { 
    813818        if ($participants && $participants != '') 
    814819            foreach ($participants as $i => $v) 
    815820                if ((is_array($v) && isset($v['user'])) && ($v['user']['mail'] == $mail || (isset($v['user']['mailAlternateAddress']) && in_array($mail, $v['user']['mailAlternateAddress'])))) 
    816                     return $v['id']; 
     821                      return !!$isFull ? $v : $v['id']; 
    817822        return false; 
    818823    } 
Note: See TracChangeset for help on using the changeset viewer.