From c17107e3dbf1b249da99eda8994bce9c3e5f2eb6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Aug 2007 12:30:57 +0000 Subject: [PATCH] Updated FAI Object creation. Profiles can't be named like other FAI object git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7115 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_askClassName.inc | 2 +- plugins/admin/fai/class_faiProfile.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/admin/fai/class_askClassName.inc b/plugins/admin/fai/class_askClassName.inc index 02fab1345..d6bf8cca3 100644 --- a/plugins/admin/fai/class_askClassName.inc +++ b/plugins/admin/fai/class_askClassName.inc @@ -62,7 +62,7 @@ class askClassName extends plugin foreach($res2 as $object){ /* skip class names with this name */ - if(in_array($this->objectClass,$object['objectClass'])){ + if(in_array($this->objectClass,$object['objectClass']) || in_array("FAIprofile",$object['objectClass'])){ if(isset($object['FAIstate'][0]) && preg_match("/removed$/",$object['FAIstate'][0])){ continue; } diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index f7ec6810c..e20bb04ef 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -412,8 +412,8 @@ class faiProfile extends plugin $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."); + if($ldap->count() || isset($this->FAIAllclasses[$this->cn])){ + $message[]=_("There is already a FAI object with this class name defined."); } return ($message); -- 2.30.2