steps = array( 'wizard_step40' => '' ); $this->step_templates = array( 'wizard_step40' => 'addressbook.importexport_wizard_vcard_charset' ); } /** * choose charset * * @param array $content * @param array $sel_options * @param array $readonlys * @param array $preserv * @return string template name */ function wizard_step40(&$content, &$sel_options, &$readonlys, &$preserv) { if($this->debug) error_log(get_class($this) . '::wizard_step40->$content '.print_r($content,true)); // return from step40 if ($content['step'] == 'wizard_step40') { switch (array_search('pressed', $content['button'])) { case 'next': return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],1); case 'previous' : return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],-1); case 'finish': return 'wizard_finish'; default : return $this->wizard_step40($content,$sel_options,$readonlys,$preserv); } } // init step40 else { $content['msg'] = $this->steps['wizard_step40']; $content['step'] = 'wizard_step40'; if(!$content['charset'] && $content['plugin_options']['charset']) { $content['charset'] = $content['plugin_options']['charset'] ? $content['plugin_options']['charset'] : 'user'; } $sel_options['charset'] = $GLOBALS['egw']->translation->get_installed_charsets()+ array( 'user' => lang('User preference'), ); $preserv = $content; // Add in extra allowed charsets $config = config::read('importexport'); $extra_charsets = array_intersect(explode(',',$config['import_charsets']), mb_list_encodings()); if($extra_charsets) { $sel_options['charset'] += array(lang('Extra encodings') => array_combine($extra_charsets,$extra_charsets)); } unset ($preserv['button']); return $this->step_templates[$content['step']]; } } }