Code

Applied in_array strict patches from trunk
[gosa.git] / gosa-core / include / class_sortableListing.inc
index 5f3524f93785a4a46e8c23d030cda8c36596481f..df89b48217e8e38d4b139b03233c2458e9789490 100644 (file)
@@ -70,7 +70,7 @@ class sortableListing {
 
         // Generate instance wide unique ID
         $id = "";
-        while($id == "" || in_array($id, $usedIds)){
+        while($id == "" || in_array_strict($id, $usedIds)){
 
             // Wait 1 msec to ensure that we definately get a new id
             if($id != "") usleep(1);
@@ -238,7 +238,7 @@ class sortableListing {
         } else {
             $edit_image= $this->editable?image('images/lists/edit.png', "%ID", _("Edit this entry")):"";
         }
-        if (strpos($this->acl, 'd') === false) {
+        if (strpos($this->acl, 'w') === false) {
             $delete_image= $this->deleteable?image('images/lists/trash-grey.png'):"";
         } else {
             $delete_image= $this->deleteable?image('images/lists/trash.png', "%ID", _("Delete this entry")):"";
@@ -558,7 +558,7 @@ class sortableListing {
     {
         // Only add if not already there
         if (!$key) {
-            if (in_array($entry, $this->data)) {
+            if (in_array_strict($entry, $this->data)) {
                 return;
             }
         } else {