Ignore:
Timestamp:
04/11/12 14:15:00 (12 years ago)
Author:
acoutinho
Message:

Ticket #2612 - Evento com erro ao importar via ExpressoMail?

File:
1 edited

Legend:

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

    r5903 r5916  
    226226                                        //Aparentemente é para retornar um ical com o evento atualizado para o attende 
    227227                                    }  
    228                                     if(isset($params['status'])) 
     228 
     229                                                                        if(isset($params['status'])) 
    229230                                    { 
    230                                         $pID = self::_getParticipantByMail( Config::me('mail') , $schedulable['participants'] ); 
    231                                         $interation['participant://'.$pID]['status'] = $params['status']; 
    232                                     } 
     231                                                                                $pID = self::_getParticipantByMail( Config::me('mail') , $schedulable['participants'] ); 
     232                                                                                //Verifica a importação de eventos em que não participo 
     233                                                                                if($pID){ 
     234                                                                                        $interation['participant://'.$pID]['status'] = $params['status']; 
     235                                                                                } 
     236                                                                        } 
    233237                                } 
    234238     
     
    478482        } 
    479483                 
    480          return $return;    
     484                return $return;    
    481485    } 
    482486     
     
    506510                             case 'REQUEST': 
    507511                                 $schedulable = self::_getSchedulable($uid); 
    508  
    509512                                 if($schedulable ) //Caso o evento exista 
    510513                                 { 
    511                                      $isOrganizer = false; 
    512                                       
    513                                       foreach($schedulable['participants'] as $value) 
    514                                         if($value['user']['id'] == Config::me('uidNumber')){ 
    515                                             if($value['isOrganizer']) 
    516                                                 $isOrganizer = true; 
    517  
    518                                     if(!self::_existInMyCalendars($schedulable['id'])){ 
    519                                             $interation = ICAL_ACTION_UPDATE;  
    520                                             $interation = ( strrpos($value['acl'], ATTENDEE_ACL_PARTICIPATION_REQUIRED) ) ? ICAL_ACTION_IMPORT_REQUIRED : ICAL_ACTION_IMPORT; 
    521                                             break; 
    522                                             }                                    
    523                                     }else 
     514                                                                 $isOrganizer = false; 
     515                                                                 $isParticipant = false; 
     516                                                                  
     517                                                                  foreach($schedulable['participants'] as $value) 
     518                                                                        if($value['user']['id'] == Config::me('uidNumber')){ 
     519                                                                                $isParticipant = true; 
     520                                                                                if($value['isOrganizer']) 
     521                                                                                        $isOrganizer = true; 
     522 
     523                                                                                if(!self::_existInMyCalendars($schedulable['id'])){ 
     524                                                                                        $interation = ICAL_ACTION_UPDATE;  
     525                                                                                        $interation = ( strrpos($value['acl'], ATTENDEE_ACL_PARTICIPATION_REQUIRED) ) ? ICAL_ACTION_IMPORT_REQUIRED : ICAL_ACTION_IMPORT; 
     526                                                                                        break; 
     527                                                                                }                                    
     528                                                                        }else 
    524529                                    { 
    525530                                        if( self::_getTime($component , 'dtstamp') > $schedulable['dtstamp'] || $component->getProperty( 'sequence' , false , false ) > $schedulable['sequence']) //Organizador esta requisitando que você atualize o evento 
     
    528533                                           $interation = ($isOrganizer) ? ICAL_ACTION_ORGANIZER_NONE : ICAL_ACTION_NONE;     
    529534                                    } 
     535                                                                        if(!$isParticipant) 
     536                                                                                $interation = ICAL_ACTION_ORGANIZER_NONE; 
    530537                                 }else 
    531538                                   $interation =  ICAL_ACTION_IMPORT; 
Note: See TracChangeset for help on using the changeset viewer.