summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 77c146c)
raw | patch | inline | side by side (parent: 77c146c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 Oct 2009 08:20:08 +0000 (08:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 Oct 2009 08:20:08 +0000 (08:20 +0000) |
-Added information about missing objectClass name
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14607 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14607 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history |
index 3bcf7f410dca6fad7a1bee1610ebda6c0eaccfa1..4b578a8f9f910fde6e4bc0d93a31ba7f1958e103 100644 (file)
if ($this->reconnect) $this->connect();
$r = @ldap_modify($this->cid, LDAP::fix($this->basedn), $attrs);
$this->error = @ldap_error($this->cid);
+ if(!$this->success() && preg_match("/^objectClass: value #([0-9]*) invalid per syntax$/", $this->get_additional_error())){
+ $oc = preg_replace("/^objectClass: value #([0-9]*) invalid per syntax$/","\\1", $this->get_additional_error());
+ if(isset($attrs['objectClass'][$oc])){
+ $this->error.= " <b>objectClass: ".$attrs['objectClass'][$oc]."</b>";
+ }
+ }
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
if ($this->reconnect) $this->connect();
$r = @ldap_add($this->cid, LDAP::fix($this->basedn), $attrs);
$this->error = @ldap_error($this->cid);
+ if(!$this->success() && preg_match("/^objectClass: value #([0-9]*) invalid per syntax$/", $this->get_additional_error())){
+ $oc = preg_replace("/^objectClass: value #([0-9]*) invalid per syntax$/","\\1", $this->get_additional_error());
+ if(isset($attrs['objectClass'][$oc])){
+ $this->error.= " <b>objectClass: ".$attrs['objectClass'][$oc]."</b>";
+ }
+ }
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";