From dca7023c2a79f97dad3c68a48cca9e02db49431f Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 5 Nov 2024 15:04:15 -0700 Subject: [PATCH] Import/export: Fix comma separated group IDs were not properly converted to user-friendly. Only the first ID was listed. --- importexport/inc/class.importexport_export_csv.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/importexport/inc/class.importexport_export_csv.inc.php b/importexport/inc/class.importexport_export_csv.inc.php index 96391e5a71..205398400e 100644 --- a/importexport/inc/class.importexport_export_csv.inc.php +++ b/importexport/inc/class.importexport_export_csv.inc.php @@ -410,7 +410,8 @@ class importexport_export_csv implements importexport_iface_export_record if ($record->$name !== null) { $names = array(); - foreach((array)$record->$name as $_name) { + foreach(is_array($record->$name) ? $record->$name : explode(',', $record->$name) as $_name) + { $names[] = Api\Accounts::title((int)$_name ?: $_name); } $record->$name = implode(', ', $names);