From: hickert Date: Mon, 1 Sep 2008 09:18:39 +0000 (+0000) Subject: Updated FAI profile checks. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2a1932f7455314be42a42d7820d37827f86e5aa7;p=gosa.git Updated FAI profile checks. -Ensure that a profile name is only used by profiles. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12320 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 417b1fd77..6f99ab6de 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -1388,7 +1388,17 @@ class faiManagement extends plugin static function check_class_name($oc,$name,$dn) { $base = FAI::get_release_dn($dn); - $res = FAI::get_all_objects_for_given_base($base,"(objectClass=".$oc.")",TRUE); + + if($oc == "FAIprofile"){ + $f = ""; + $ocs = array("FAItemplate","FAIhook","FAIpartitionTable","FAIpackageList","FAIscript","FAIvariable"); + foreach($ocs as $oc){ + $f .= "(objectClass=".$oc.")"; + } + $res = FAI::get_all_objects_for_given_base($base,"(|".$f.")",TRUE); + }else{ + $res = FAI::get_all_objects_for_given_base($base,"(objectClass=".$oc.")",TRUE); + } $delete = array(); $used = array(); foreach($res as $object){