Changeset 7228 for branches/2.4/prototype/modules/calendar/export.php
- Timestamp:
- 09/17/12 14:30:47 (12 years ago)
- Location:
- branches/2.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4
- Property svn:mergeinfo changed
-
branches/2.4/prototype/modules/calendar/export.php
r7093 r7228 1 1 <?php 2 3 /** 4 * 5 * Copyright (C) 2011 Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 * details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * 21 * You can contact Prognus Software Livre headquarters at Av. Tancredo Neves, 22 * 6731, PTI, EdifÃcio do Saber, 3º floor, room 306, Foz do Iguaçu - PR - Brasil 23 * or at e-mail address prognus@prognus.com.br. 24 * 25 * Neste arquivo são ser implementadas regras de negócio para a exportação de eventos e tarefas do ExpressoCalendar.26 * 27 * @license http://www.gnu.org/copyleft/gpl.html GPL 28 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 29 * @version 1.0 30 * @sponsor Caixa EconÃŽmica Federal 31 * @since Arquivo disponibilizado na versão Expresso 2.4.0 32 */ 2 3 /** 4 * 5 * Copyright (C) 2011 Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 * details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * 21 * You can contact Prognus Software Livre headquarters at Av. Tancredo Neves, 22 * 6731, PTI, Edifício do Saber, 3º floor, room 306, Foz do Iguaçu - PR - Brasil 23 * or at e-mail address prognus@prognus.com.br. 24 * 25 * Neste arquivo são ser implementadas regras de negócio para a exportação de eventos e tarefas do ExpressoCalendar. 26 * 27 * @license http://www.gnu.org/copyleft/gpl.html GPL 28 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 29 * @version 1.0 30 * @sponsor Caixa Econômica Federal 31 * @since Arquivo disponibilizado na versão Expresso 2.4.0 32 */ 33 33 34 34 require_once '../../api/controller.php'; … … 78 78 { 79 79 $event = Controller::read(array('concept' => 'schedulable' , 'id' => $params['event'])); 80 81 82 83 84 85 86 87 88 80 $attachmentRelation = Controller::find( array( 'concept' => 'schedulableToAttachment' ) , false ,array( 'filter' => array('=', 'schedulable' , $event['id']) )); 81 if(is_array($attachmentRelation)){ 82 $attachments = array(); 83 foreach($attachmentRelation as $key => $value) 84 if(isset($value['attachment']) || !!$value['attachment']) 85 $attachments[$key] = $value['attachment']; 86 //Pega os anexos sem source 87 $event['attachments'] = Controller::find( array( 'concept' => 'attachment' ) , false ,array( 'filter' => array('IN', 'id' , $attachments) )); 88 } 89 89 90 90 $repeat = Controller::find( array( 'concept' => 'repeat' ) , false ,array( 'filter' => array('=', 'schedulable' , $event['id']) ));
Note: See TracChangeset
for help on using the changeset viewer.