Changeset 5132 for trunk/calendar/inc/class.uiicalendar.inc.php
- Timestamp:
- 11/03/11 13:21:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.uiicalendar.inc.php
r3736 r5132 17 17 { 18 18 var $bo; 19 // var $ui; 19 20 var $template; 20 21 … … 30 31 { 31 32 $this->bo = CreateObject('calendar.boicalendar'); 33 // $this->ui = CreateObject('calendar.uicalendar'); 34 32 35 $this->template = $GLOBALS['phpgw']->template; 33 36 $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Calendar - [iv]Cal Importer'); … … 77 80 } 78 81 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); 81 84 } 82 85 83 function get_error_message($error_number) {84 switch ($error_number) {85 case 1:86 return lang('event already exists');87 }88 }89 86 90 87 function import() … … 108 105 } 109 106 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 ); 118 112 119 113 $var = Array( 120 114 'vcal_header' => '<p>', 121 115 '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'), 123 117 'lang_access' => lang('Access'), 124 118 'lang_groups' => lang('Which groups'), … … 128 122 ); 129 123 $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'); 132 125 } 133 126 }
Note: See TracChangeset
for help on using the changeset viewer.