Changeset 6996 for trunk/prototype/modules/calendar/export.php
- Timestamp:
- 08/10/12 19:11:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/export.php
r5863 r6996 46 46 { 47 47 $event = Controller::read(array('concept' => 'schedulable' , 'id' => $params['event'])); 48 49 50 51 52 53 54 55 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 } 57 57 58 58 $repeat = Controller::find( array( 'concept' => 'repeat' ) , false ,array( 'filter' => array('=', 'schedulable' , $event['id']) ));
Note: See TracChangeset
for help on using the changeset viewer.