Code

Avoid multiple entries at a time
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Jan 2010 17:35:36 +0000 (17:35 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Jan 2010 17:35:36 +0000 (17:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15216 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_sortableListing.inc

index cf7a5e66fd555f03133d0d6d96ec9053ab34e76b..01d9b33df5566ef253de6aee30a8a1605e580419 100644 (file)
@@ -419,6 +419,11 @@ class sortableListing {
 
   public function addEntry($entry, $displayEntry= null)
   {
+    // Only add if not already there
+    if (in_array($entry, $this->data)) {
+      return;
+    }
+
     // Prefill with default value if not specified
     if (!$displayEntry) {
       $displayEntry= array($entry);