summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6013212)
raw | patch | inline | side by side (parent: 6013212)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jun 2006 12:47:22 +0000 (12:47 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jun 2006 12:47:22 +0000 (12:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3911 594d385d-05f5-0310-b6e9-bd551577e9d8
Changelog | patch | blob | history | |
plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history |
diff --git a/Changelog b/Changelog
index ee58e803248eeae7068c260c2607513497e3cba8..5d2bc8d093cb83099ffb2fd7902f9882483584a6 100644 (file)
--- a/Changelog
+++ b/Changelog
- Fixed problems when moving around departments including a comma
- Unified bool values in gosa.conf. true/yes and false/no are valid
now in upper and lower case.
+ - Avoid the try of creating already existing ou's
* gosa 2.5.1
- Fixed problems with NFS shares and terminals
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index e7bdf678d109cfd848982d612b0bb4be3f4402de..5205da94447f99145248934c108fc8bb617b3a91 100644 (file)
/* Check for presence of this department */
$ldap= $this->config->get_ldap_link();
- $attrs= $ldap->cat ($this->dn, array('dn'));
- if ($this->orig_dn == "new" && !($attrs === FALSE)){
+ $ldap->ls ("(&(ou=".$this->ou.")(objectClass=organizationalUnit))", $this->base, array('dn'));
+ if ($this->orig_dn == "new" && $ldap->count()){
$message[]= _("Department with that 'Name' already exists.");
} elseif ($this->orig_dn != $this->dn && !($attrs === FALSE)){
$message[]= _("Department with that 'Name' already exists.");