Changeset 5514 for trunk/prototype/modules/calendar/export.php
- Timestamp:
- 02/14/12 16:52:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/export.php
r5399 r5514 31 31 $eventsIds[] = $eventLink['schedulable']; 32 32 33 $events = Controller::find(array('concept' => 'schedulable') , false , array('filter' => array('IN','id',$eventsIds) , 'deepness' => '2' )); 33 $events = Controller::find(array('concept' => 'schedulable') , false , array('filter' => array('IN','id',$eventsIds) , 'deepness' => '2' )); 34 34 $ics = Controller::format( array( 'service' => 'iCal' ) , $events , array('defaultTZI' => $calendar['timezone']) ); 35 35 … … 45 45 { 46 46 $event = Controller::read(array('concept' => 'schedulable' , 'id' => $params['event'])); 47 $attachmentRelation = Controller::find( array( 'concept' => 'schedulableToAttachment' ) , false ,array( 'filter' => array('=', 'schedulable' , $event['id']) )); 48 if(is_array($attachmentRelation)){ 49 $attachments = array(); 50 foreach($attachmentRelation as $key => $value) 51 if(isset($value['attachment']) || !!$value['attachment']) 52 $attachments[$key] = $value['attachment']; 53 //Pega os anexos sem source 54 $event['attachments'] = Controller::find( array( 'concept' => 'attachment' ) , false ,array( 'filter' => array('IN', 'id' , $attachments) )); 55 } 56 47 57 $ics = Controller::format( array( 'service' => 'iCal' ) , array($event) , array('defaultTZI' => $event['timezone']) ); 48 58
Note: See TracChangeset
for help on using the changeset viewer.