-
-sub get_contacts
-{
- my $contacts = @_ ? shift : {};
-
- if (param ('c_value'))
- {
- my @c_values = param ('c_value');
- my @c_types = param ('c_type');
-
- my %cts = ();
-
- die if (scalar (@c_values) != scalar (@c_types));
-
- for (my $i = 0; $i < scalar (@c_values); $i++)
- {
- my $type = $c_types[$i];
- my $value = $c_values[$i];
-
- $cts{$type} = [] unless (defined ($cts{$type}));
- push (@{$cts{$type}}, $value) if ($value);
- }
-
- for (@MultiFields)
- {
- my $type = $_;
- @{$contacts->{$type}} = @{$cts{$type}} if (defined ($cts{$type}));
- }
- }
-
- return ($contacts);
-}