Ignore:
Timestamp:
04/13/12 17:25:00 (12 years ago)
Author:
acoutinho
Message:

Ticket #2626 - Inconsistencia no organizador de um evento quando criado a partir de uma agenda compartilhada

File:
1 edited

Legend:

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

    r5916 r5947  
    512512                                 if($schedulable ) //Caso o evento exista 
    513513                                 { 
    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 
     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 
    529529                                    { 
    530530                                        if( self::_getTime($component , 'dtstamp') > $schedulable['dtstamp'] || $component->getProperty( 'sequence' , false , false ) > $schedulable['sequence']) //Organizador esta requisitando que você atualize o evento 
     
    989989        static private function _existInMyCalendars( $id ) 
    990990        { 
    991            $sig = Controller::find(array('concept' => 'calendarSignature'), array('user','calendar'), array('filter' => array( '=' , 'user' , Config::me('uidNumber'))));        
     991           $sig = Controller::find(array('concept' => 'calendarSignature'), array('user','calendar', 'isOwner'), array('filter' => array('AND', array( '=' , 'user' , Config::me('uidNumber') ) , array('=' , 'isOwner' , '1' ))));        
    992992           $calendars = array(); 
    993993           foreach ($sig as $val) 
Note: See TracChangeset for help on using the changeset viewer.