index 4caa9d0e2b3aeabbb7adf92029309fab7aab301e..376a418348a7ce5c0ab8eb0f4e050e24636d0dac 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
$ldap->rmdir_recursive($this->dn);
+ show_ldap_error($ldap->get_error(), _("Removing FAI hook base failed"));
$this->handle_post_events("remove");
}
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving FAI hook base failed"));
/* Do object tagging */
$this->handle_object_tagging();
- show_ldap_error($ldap->get_error());
$ldap->cd($this->dn);
if($obj['status']=="new"){
$ldap->cat($sub_dn,array("objectClass"));
if($ldap->count()){
- $obj['status']="modify";
+ $obj['status']="edited";
}
}
/* Check if gosaAdministrativeUnitTag is required as object class */
- if($obj['status'] == "modify"){
+ if($obj['status'] == "edited"){
$ldap->cat($sub_dn,array("objectClass"));
$attrs = $ldap->fetch();
if(isset($attrs['objectClass'])){
$ldap->cd($sub_dn);
$ldap->rmdir_recursive($sub_dn);
$this->handle_post_events("remove");
+ show_ldap_error($ldap->get_error(), _("Removing FAI hook failed"));
}elseif($obj['status'] == "edited"){
$ldap->cd($sub_dn);
$this->cleanup();
$ldap->modify ($tmp);
$this->handle_post_events("modify");
+ show_ldap_error($ldap->get_error(), _("Saving FAI hook failed"));
}elseif($obj['status']=="new"){
if($tmp['description']==array()){
unset($tmp['description']);
$ldap->cd($sub_dn);
$ldap->add($tmp);
$this->handle_post_events("add");
+ show_ldap_error($ldap->get_error(), _("Saving FAI hook failed"));
}
$this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
- show_ldap_error($ldap->get_error());
}
}
}