summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/communigate_pro.pm28
1 files changed, 17 insertions, 11 deletions
diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm
index 76fd60815..a3847bf2e 100644
--- a/FS/FS/part_export/communigate_pro.pm
+++ b/FS/FS/part_export/communigate_pro.pm
@@ -823,17 +823,7 @@ sub export_getsettings_svc_acct {
foreach my $key ( grep ref($effective_settings->{$_}),
keys %$effective_settings )
{
- my $value = $effective_settings->{$key};
- if ( ref($value) eq 'ARRAY' ) {
- $effective_settings->{$key} =
- join(' ', map { ref($_) ? '['.join(', ', @$_).']' : $_ } @$value );
- } elsif ( ref($value) eq 'HASH' ) {
- $effective_settings->{$key} =
- join(', ', map { "$_:".$value->{$_} } keys %$value );
- } else {
- #XXX
- warn "serializing ". ref($value). " for table display not yet handled";
- }
+ $effective_settings->{$key} = _pretty( $effective_settings->{$key} );
}
%{$settingsref} = %$effective_settings;
@@ -843,6 +833,22 @@ sub export_getsettings_svc_acct {
}
+sub _pretty {
+ my $value = shift;
+ if ( ref($value) eq 'ARRAY' ) {
+ '['. join(' ', map { ref($_) ? _pretty($_) : $_ } @$value ). ']';
+ } elsif ( ref($value) eq 'HASH' ) {
+ my $hv = $value->{$_};
+ join(', ', map { my $v = $value->{$_};
+ "$_:". ref($v) ? _pretty($v) : $_
+ }
+ keys %$value
+ );
+ } else {
+ warn "serializing ". ref($value). " for table display not yet handled";
+ }
+}
+
sub export_getsettings_svc_forward {
my($self, $svc_forward, $settingsref, $defaultref ) = @_;