Ignore:
Timestamp:
08/06/12 18:17:24 (12 years ago)
Author:
acoutinho
Message:

Ticket #2966 - Suporte a importacao e exportacao de tarefas / correcoes de bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/export.php

    r5863 r6951  
    4646{     
    4747    $event = Controller::read(array('concept' => 'schedulable' , 'id' => $params['event'])); 
    48         $attachmentRelation = Controller::find( array( 'concept' => 'schedulableToAttachment' ) , false ,array( 'filter' => array('=', 'schedulable'  ,  $event['id']) ));  
    49         if(is_array($attachmentRelation)){ 
    50                 $attachments = array(); 
    51                 foreach($attachmentRelation as $key => $value) 
    52                         if(isset($value['attachment']) || !!$value['attachment']) 
    53                                 $attachments[$key]  = $value['attachment']; 
    54                 //Pega os anexos sem source 
    55                 $event['attachments'] = Controller::find( array( 'concept' => 'attachment' ) , false ,array( 'filter' => array('IN', 'id' , $attachments) ));  
    56         } 
     48    $attachmentRelation = Controller::find( array( 'concept' => 'schedulableToAttachment' ) , false ,array( 'filter' => array('=', 'schedulable'  ,  $event['id']) ));  
     49    if(is_array($attachmentRelation)){ 
     50            $attachments = array(); 
     51            foreach($attachmentRelation as $key => $value) 
     52                    if(isset($value['attachment']) || !!$value['attachment']) 
     53                            $attachments[$key]  = $value['attachment']; 
     54            //Pega os anexos sem source 
     55            $event['attachments'] = Controller::find( array( 'concept' => 'attachment' ) , false ,array( 'filter' => array('IN', 'id' , $attachments) ));  
     56    } 
    5757         
    5858    $repeat = Controller::find( array( 'concept' => 'repeat' ) , false ,array( 'filter' => array('=', 'schedulable'  ,  $event['id']) ));     
Note: See TracChangeset for help on using the changeset viewer.