Ignore:
Timestamp:
11/03/11 13:21:19 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus, do modulo calendar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.uiicalendar.inc.php

    r3736 r5132  
    1717        { 
    1818                var $bo; 
     19//              var $ui; 
    1920                var $template; 
    2021 
     
    3031                { 
    3132                        $this->bo = CreateObject('calendar.boicalendar'); 
     33//                      $this->ui = CreateObject('calendar.uicalendar'); 
     34 
    3235                        $this->template = $GLOBALS['phpgw']->template; 
    3336                        $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Calendar - [iv]Cal Importer'); 
     
    7780                } 
    7881 
    79                 function import_from_mail($calendar) { 
    80                         return $this->bo->import(explode("\n",$calendar),true); 
     82                function import_from_mail($calendar, $from_ajax, $importAccount = false) { 
     83                        return $this->bo->import(explode("\n",$calendar),$from_ajax,$importAccount); 
    8184                } 
    8285                 
    83                 function get_error_message($error_number) { 
    84                         switch ($error_number) { 
    85                                 case 1: 
    86                                         return lang('event already exists'); 
    87                         } 
    88                 } 
    8986 
    9087                function import() 
     
    108105                        } 
    109106 
    110                         $this->template->set_file(array('vcalimport' => 'vcal_import.tpl')); 
    111                         $this->template->set_block('vcalimport','page_block'); 
    112                         $this->template->set_block('vcalimport','error_block'); 
    113                          
    114                         if($GLOBALS['HTTP_GET_VARS']['error_number']) { 
    115                                 $this->template->set_var('error_message',$this->get_error_message( $GLOBALS['HTTP_GET_VARS']['error_number'] ) ); 
    116                                 $this->template->parse('error_box','error_block',true); 
    117                         } 
     107                        $this->template->set_file( 
     108                                Array( 
     109                                        'vcalimport' => 'vcal_import.tpl' 
     110                                ) 
     111                        ); 
    118112                         
    119113                        $var = Array( 
    120114                                'vcal_header'   => '<p>', 
    121115                                'ical_lang'             => lang('(i/v)Cal'), 
    122                                 'action_url'    => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.boicalendar.import'), 
     116                                'action_url'    => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.boicalendar.import&calendarImport=1'), 
    123117                                'lang_access'   => lang('Access'), 
    124118                                'lang_groups'   => lang('Which groups'), 
     
    128122                        ); 
    129123                        $this->template->set_var($var); 
    130                         $this->template->pfp('out', 'page_block'); 
    131                         // $this->template->pparse('out','page_block'); 
     124                        $this->template->pparse('out','vcalimport'); 
    132125                } 
    133126        } 
Note: See TracChangeset for help on using the changeset viewer.