Code

Added sort and uniq for array attributes in hw detection.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 14:35:01 +0000 (14:35 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 14:35:01 +0000 (14:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10620 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/siTriggered.pm

index 2ae7a78bd3e2d54881f4e9ab86a7c6c51c22c5e5..5f7e731727eb7c3a20dbde9c0210b9a0b285dd38 100644 (file)
@@ -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);
                                }
                        }