From 932f002ca0666639a41286c8ef5067bc92301410 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 22 Apr 2008 14:35:01 +0000 Subject: [PATCH] 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 --- gosa-si/server/events/siTriggered.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- 2.30.2