Code

Tuned debugging and removed objectclasses
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Feb 2006 16:15:43 +0000 (16:15 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Feb 2006 16:15:43 +0000 (16:15 +0000)
Still observing...

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2663 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ldap.inc
include/class_plugin.inc

index d97e1e01d0c6a57ead142fb72a64bcc8a2d300d8..a87a2e75f7dda75c0e365c32198011e5f26abe1b 100644 (file)
@@ -520,6 +520,9 @@ class LDAP{
 
   function modify($attrs)
   {
+    if(count($attrs) == 0){
+      return (0);
+    }
     if($this->hascon){
       if ($this->reconnect) $this->connect();
       $r = @ldap_modify($this->cid, $this->fix($this->basedn), $attrs);
index c2c4ca5f8ebf24626f4bf882728ba0a19dd96283..99915df57124bd485e5ac101e8442ae5de00739a 100644 (file)
@@ -332,17 +332,17 @@ class plugin
         continue;
       }
 
-      if (is_array($this->attrs[$index]) && is_array($this->saved_attributes[$index]) && 
-          count(array_diff($this->attrs[$index], $this->saved_attributes[$index]))==0 && $index != "objectClass"){
+      if (is_array($this->attrs[$index]) && isset($this->saved_attributes[$index]) && is_array($this->saved_attributes[$index]) && count(array_diff($this->attrs[$index], $this->saved_attributes[$index]))==0 ){
         unset ($this->attrs[$index]);
         continue;
       }
     }
 
-    #################################
-    ; echo "--- DEBUG: changes ---" ;
-    ; print_a ($this->attrs)        ;
-    #################################
+    #######################################################
+    ; echo "--- DEBUG: changes ---<br>"                   ;
+    ; print_a ($this->attrs)                              ;
+    ; if (count($this->attrs)==0)echo "<b>Skipped</b><br>";
+    #######################################################
   }
 
   /* Check formular input */