From: janw Date: Tue, 22 Apr 2008 14:35:01 +0000 (+0000) Subject: Added sort and uniq for array attributes in hw detection. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=932f002ca0666639a41286c8ef5067bc92301410;p=gosa.git Added sort and uniq for array attributes in hw detection. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10620 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/siTriggered.pm b/gosa-si/server/events/siTriggered.pm index 2ae7a78bd..5f7e73172 100644 --- a/gosa-si/server/events/siTriggered.pm +++ b/gosa-si/server/events/siTriggered.pm @@ -221,7 +221,7 @@ sub detected_hardware { if(defined($entry->get_value($attribute))) { $entry->delete($attribute); } - foreach my $array_entry (@{$msg_hash->{detected_hardware}[0]->{$attribute}}) { + foreach my $array_entry (keys %{{map { $_ => 1 } sort(@{$msg_hash->{detected_hardware}[0]->{$attribute}}) }}) { $entry->add($attribute => $array_entry); } }