From ba49230e0e76397af870ed6992465195d1a39a17 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 8 Sep 2006 06:35:37 +0000 Subject: [PATCH] Same here git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4623 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiProfile.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index e9c646ecb..53a511ad7 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -391,7 +391,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."); -- 2.30.2