Changeset 5916 for trunk/prototype/services/iCal.php
- Timestamp:
- 04/11/12 14:15:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/services/iCal.php
r5903 r5916 226 226 //Aparentemente é para retornar um ical com o evento atualizado para o attende 227 227 } 228 if(isset($params['status'])) 228 229 if(isset($params['status'])) 229 230 { 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 } 233 237 } 234 238 … … 478 482 } 479 483 480 484 return $return; 481 485 } 482 486 … … 506 510 case 'REQUEST': 507 511 $schedulable = self::_getSchedulable($uid); 508 509 512 if($schedulable ) //Caso o evento exista 510 513 { 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 524 529 { 525 530 if( self::_getTime($component , 'dtstamp') > $schedulable['dtstamp'] || $component->getProperty( 'sequence' , false , false ) > $schedulable['sequence']) //Organizador esta requisitando que você atualize o evento … … 528 533 $interation = ($isOrganizer) ? ICAL_ACTION_ORGANIZER_NONE : ICAL_ACTION_NONE; 529 534 } 535 if(!$isParticipant) 536 $interation = ICAL_ACTION_ORGANIZER_NONE; 530 537 }else 531 538 $interation = ICAL_ACTION_IMPORT;
Note: See TracChangeset
for help on using the changeset viewer.