From: cajus Date: Fri, 8 Sep 2006 06:32:13 +0000 (+0000) Subject: Fixed problem with empty old_cn when creating a new entry. You always can overwrite... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1fb850eba9b26edf354a71e3f2a8fb1d1b17a473;p=gosa.git Fixed problem with empty old_cn when creating a new entry. You always can overwrite an existing one, even if it is freezed. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4622 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index 40c61eb32..65871611b 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -389,7 +389,11 @@ class faiProfile extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd($_SESSION['CurrentMainBase']); - $ldap->search("(&(objectClass=FAIprofile)(cn=".$this->cn.")(!cn=".$this->old_cn."))",array("*")); + if ($this->old_cn == ""){ + $ldap->search("(&(objectClass=FAIprofile)(cn=".$this->cn."))",array("*")); + } else { + $ldap->search("(&(objectClass=FAIprofile)(cn=".$this->cn.")(!cn=".$this->old_cn."))",array("*")); + } if($ldap->count()){ $message[]=_("There is already a profile with this class name defined.");