diff --git a/infolog/csv_import.php b/infolog/csv_import.php index b49e0c6ff2..d4b9cb2b9d 100644 --- a/infolog/csv_import.php +++ b/infolog/csv_import.php @@ -140,11 +140,10 @@ function cat_id($cats) break; case 'download': - $pref_file = '/tmp/csv_import_info_log.php'; - if (is_readable($pref_file) && ($prefs = fopen($pref_file,'r'))) { - eval(fread($prefs,8000)); - // echo "

defaults = array".dump_array($defaults)."

\n"; - } else { + $GLOBALS['phpgw']->preferences->read_repository(); + $defaults = $GLOBALS['phpgw_info']['user']['preferences']['infolog']['cvs_import']; + if (!is_array($defaults)) + { $defaults = array(); } $t->set_var('lang_csv_fieldname',lang('CSV-Fieldname')); @@ -154,8 +153,7 @@ function cat_id($cats) $t->set_var('lang_debug',lang('Test Import (show importable records only in browser)')); $t->parse('fheaderhandle','fheader'); $hiddenvars .= ''."\n". - '\n". - '\n"; + '\n"; $info_names = array( 'type' => 'Type: task,phone,note,confirm,reject,email,fax', 'from' => 'From: text(64) free text if no Addressbook-entry assigned', @@ -177,6 +175,7 @@ function cat_id($cats) 'cat_id' => 'Categorie id(s), to set use @cat_id(Cat1,Cat2)', 'addr_id' => 'Addressbook id, to set use @addr_id(nlast,nfirst,org)' ); + /* this are settings to import from Lotus Organizer $mktime_lotus = "${PSep}0?([0-9]+)[ .:-]+0?([0-9]*)[ .:-]+0?([0-9]*)[ .:-]+0?([0-9]*)[ .:-]+0?([0-9]*)[ .:-]+0?([0-9]*).*$ASep@mktime(${VPre}4,${VPre}5,${VPre}6,${VPre}2,${VPre}3,${VPre}1)"; $defaults += array( 'Land' => "addr$PSep.*[(]+([0-9]+)[)]+$ASep+${VPre}1 (${CPre}Ortsvorwahl$CPos) ${CPre}Telefon$CPos$PSep${CPre}Telefon$CPos", @@ -190,7 +189,7 @@ function cat_id($cats) "${PSep}${CPre}Nachname$CPos, ${CPre}Vorname$CPos", 'no CSV 1' => "type${PSep}phone", 'no CSV 2' => "subject${PSep}@substr(${CPre}Notiz$CPos,0,60).' ...'" ); - + */ $info_name_options = "