From 2f28409738f8f39342bdcf4ce14e3789014b3f04 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 8 Jul 2008 12:16:58 +0000 Subject: [PATCH] "fixed not displayed customfields in 1.4 calendar csv import" --- calendar/csv_import.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/calendar/csv_import.php b/calendar/csv_import.php index 84d7285f5e..436fd42cae 100644 --- a/calendar/csv_import.php +++ b/calendar/csv_import.php @@ -106,7 +106,7 @@ if (is_numeric($cat) && $GLOBALS['egw']->categories->id2name($cat) != '--') { $cat2id[$cat] = $ids[$cat] = $cat; - } + } elseif ($id = $GLOBALS['egw']->categories->name2id( addslashes($cat) )) { // cat exists $cat2id[$cat] = $ids[$cat] = $id; @@ -182,7 +182,8 @@ $custom_fields = $config->read_repository(); unset($config); //echo "custom-fields=
".print_r($custom_fields,True)."
"; - foreach ($custom_fields as $name => $data) + if (is_array($custom_fields['customfields'])) + foreach ($custom_fields['customfields'] as $name => $data) { $cal_names['#'.$name] = $data['label'].': Custom field ('.$data['type'].')'; } @@ -481,7 +482,7 @@ $action = $values['id'] ? 'updating' : 'adding'; //echo $action.'
'.print_r($values,True)."
\n"; $cal_id = $cal->bo->update($values,true,!$values['modified'],$is_admin); // ignoring conflicts and ACL (for admins) on import - + $log .= "\t\t".''.($cal_id ? $action." cal_id=$cal_id" : 'Error '.$action)."\n\t\n"; } else