- Use global categories when listing each cat in its own column

- Fix missing value when exporting categories as DB values
This commit is contained in:
Nathan Gray 2011-03-15 16:49:45 +00:00
parent ca00d4c69a
commit c0da31b5f3

View File

@ -87,7 +87,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
} }
break; break;
case self::EACH_CAT: case self::EACH_CAT:
$cats = $cat_obj->return_array('all', 0, false); $cats = $cat_obj->return_array('all', 0, false,'','ASC','',true);
foreach($cats as $settings) { foreach($cats as $settings) {
$name = $settings['name']; $name = $settings['name'];
$path = $settings; $path = $settings;
@ -272,6 +272,8 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
$record_value = $record->$field_name; $record_value = $record->$field_name;
$record_value[] = $settings['label']; $record_value[] = $settings['label'];
$record->$field_name = $record_value; $record->$field_name = $record_value;
} else {
$record->$field_name = $value;
} }
} }
if($explode_settings['explode'] == self::MAIN_CATS && count(array_intersect($record->$field, array_keys($settings['subs'])))) { if($explode_settings['explode'] == self::MAIN_CATS && count(array_intersect($record->$field, array_keys($settings['subs'])))) {