From 25d6c4715015d1dd280dfd0e1dc2175e0446e337 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 10 Feb 2006 16:15:43 +0000 Subject: [PATCH] Tuned debugging and removed objectclasses Still observing... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2663 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 3 +++ include/class_plugin.inc | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index d97e1e01d..a87a2e75f 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -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); diff --git a/include/class_plugin.inc b/include/class_plugin.inc index c2c4ca5f8..99915df57 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -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 ---
" ; + ; print_a ($this->attrs) ; + ; if (count($this->attrs)==0)echo "Skipped
"; + ####################################################### } /* Check formular input */ -- 2.30.2