From 81e830520256020bfac063e1360bf7aac6610d9f Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 15 Jan 2008 14:04:53 +0000 Subject: [PATCH] Renamed class fai_func to FAI git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8365 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_location.inc | 2 +- .../fai/{class_fai_func.inc => class_FAI.inc} | 68 +++++++++---------- gosa-core/plugins/admin/fai/class_faiHook.inc | 16 ++--- .../plugins/admin/fai/class_faiManagement.inc | 18 ++--- .../plugins/admin/fai/class_faiPackage.inc | 12 ++-- .../admin/fai/class_faiPartitionTable.inc | 26 +++---- .../plugins/admin/fai/class_faiProfile.inc | 6 +- .../admin/fai/class_faiProfileEntry.inc | 2 +- .../plugins/admin/fai/class_faiScript.inc | 16 ++--- .../plugins/admin/fai/class_faiSummaryTab.inc | 4 +- .../plugins/admin/fai/class_faiTemplate.inc | 16 ++--- .../plugins/admin/fai/class_faiVariable.inc | 16 ++--- .../systems/class_workstationStartup.inc | 2 +- 13 files changed, 102 insertions(+), 102 deletions(-) rename gosa-core/plugins/admin/fai/{class_fai_func.inc => class_FAI.inc} (88%) diff --git a/gosa-core/include/class_location.inc b/gosa-core/include/class_location.inc index 3b9282460..f60535dee 100644 --- a/gosa-core/include/class_location.inc +++ b/gosa-core/include/class_location.inc @@ -92,7 +92,7 @@ $class_mapping= array( "askClassName" => "plugins/admin/fai/class_askClassName.inc", "faiTemplateEntry" => "plugins/admin/fai/class_faiTemplateEntry.inc", "debconf" => "plugins/admin/fai/class_debconfTemplate.inc", - "fai_func" => "plugins/admin/fai/class_fai_func.inc", + "FAI" => "plugins/admin/fai/class_FAI.inc", "groupManagement" => "plugins/admin/groups/class_groupManagement.inc", "group" => "plugins/admin/groups/class_groupGeneric.inc", "divListGroup" => "plugins/admin/groups/class_divListGroup.inc", diff --git a/gosa-core/plugins/admin/fai/class_fai_func.inc b/gosa-core/plugins/admin/fai/class_FAI.inc similarity index 88% rename from gosa-core/plugins/admin/fai/class_fai_func.inc rename to gosa-core/plugins/admin/fai/class_FAI.inc index 822860a3e..daaf5f510 100644 --- a/gosa-core/plugins/admin/fai/class_fai_func.inc +++ b/gosa-core/plugins/admin/fai/class_FAI.inc @@ -3,7 +3,7 @@ define("DEBUG_FAI_FUNC",FALSE); -class fai_func +class FAI { /* TEST PHASE .... */ @@ -20,13 +20,13 @@ class fai_func $res = array(); $tmp = array(); - if(!fai_func::is_release_department($Current_DN)) { + if(!FAI::is_release_department($Current_DN)) { return($res); } /* Collect some basic informations and initialize some variables */ - $base_release = fai_func::get_release_dn($Current_DN); - $previous_releases = array_reverse(fai_func:: get_previous_releases_of_this_release($base_release,true)); + $base_release = FAI::get_release_dn($Current_DN); + $previous_releases = array_reverse(FAI:: get_previous_releases_of_this_release($base_release,true)); /* We must also include the given release dn */ $previous_releases[] = $base_release; @@ -35,7 +35,7 @@ class fai_func foreach($previous_releases as $release){ /* Get fai departments */ - $deps_to_search = fai_func::get_FAI_departments($release); + $deps_to_search = FAI::get_FAI_departments($release); /* For every single department (ou=hoos,ou ..) */ foreach($deps_to_search as $fai_base){ @@ -149,12 +149,12 @@ class fai_func $ldap->cd($config->current['BASE']); /* Get some basic informations */ - $parent_obj = fai_func::get_parent_release_object($Current_DN); + $parent_obj = FAI::get_parent_release_object($Current_DN); if(!empty($parent_obj)){ $ldap->cat($parent_obj,array("*")); - $attrs = fai_func:: prepare_ldap_fetch_to_be_saved($ldap->fetch()); + $attrs = FAI:: prepare_ldap_fetch_to_be_saved($ldap->fetch()); - if(!fai_func::array_diff_FAI( $attrs,$objectAttrs)){ + if(!FAI::array_diff_FAI( $attrs,$objectAttrs)){ $addObj['diff'] = FALSE; } } @@ -193,7 +193,7 @@ class fai_func } ksort($ar1); ksort($ar2); - if(count( array_diff($ar1,$ar2)) || fai_func::arr_diff($ar1,$ar2)){ + if(count( array_diff($ar1,$ar2)) || FAI::arr_diff($ar1,$ar2)){ return(true); }else{ return(false); @@ -207,7 +207,7 @@ class fai_func if(!isset($ar2[$ak1]) || (!($av1 === $ar2[$ak1]))){ return(true); }elseif(is_array($av1)){ - return(fai_func::arr_diff($av1,$ar2[$ak1])); + return(FAI::arr_diff($av1,$ar2[$ak1])); } } return(FALSE); @@ -260,10 +260,10 @@ class fai_func $ldap->cd($config->current['BASE']); /* Get some basic informations */ - $base_release = fai_func::get_release_dn($Current_DN); - $sub_releases = fai_func:: get_sub_releases_of_this_release($base_release,true); - $parent_obj = fai_func::get_parent_release_object($Current_DN); - $following_releases = fai_func:: get_sub_releases_of_this_release($base_release,true); + $base_release = FAI::get_release_dn($Current_DN); + $sub_releases = FAI:: get_sub_releases_of_this_release($base_release,true); + $parent_obj = FAI::get_parent_release_object($Current_DN); + $following_releases = FAI:: get_sub_releases_of_this_release($base_release,true); /* Check if given dn exists or if is a new entry */ $ldap->cat($Current_DN); @@ -290,7 +290,7 @@ class fai_func }else{ /* Set FAIstate to current objectAttrs */ - $objectAttrs = fai_func:: prepare_ldap_fetch_to_be_saved($ldap->fetch()); + $objectAttrs = FAI:: prepare_ldap_fetch_to_be_saved($ldap->fetch()); if(isset($objectAttrs['FAIstate'][0])){ if(!preg_match("/removed$/",$objectAttrs['FAIstate'][0])){ $objectAttrs['FAIstate'][0] .= "|removed"; @@ -309,7 +309,7 @@ class fai_func echo "Saving directly, is a leaf object
".$Current_DN; print_a($objectAttrs); } - fai_func::save_FAI_object($Current_DN,$objectAttrs); + FAI::save_FAI_object($Current_DN,$objectAttrs); }else{ /* This object is inherited by some sub releases */ @@ -319,7 +319,7 @@ class fai_func /* Get parent object */ $ldap->cat($parent_obj); - $parent_attrs = fai_func:: prepare_ldap_fetch_to_be_saved($ldap->fetch()); + $parent_attrs = FAI:: prepare_ldap_fetch_to_be_saved($ldap->fetch()); /* New objects require special handling */ if($is_new){ @@ -333,14 +333,14 @@ class fai_func echo "Saving main object".$Current_DN; print_a($objectAttrs); } - fai_func::save_FAI_object($Current_DN,$objectAttrs); + FAI::save_FAI_object($Current_DN,$objectAttrs); foreach($r as $key){ if(DEBUG_FAI_FUNC) { echo "Saving parent to following release ".$key; print_a($parent_attrs); } - fai_func::save_FAI_object($key,$parent_attrs); + FAI::save_FAI_object($key,$parent_attrs); } }else{ @@ -348,7 +348,7 @@ class fai_func echo "Saving main object".$Current_DN; print_a($objectAttrs); } - fai_func::save_FAI_object($Current_DN,$objectAttrs); + FAI::save_FAI_object($Current_DN,$objectAttrs); if(isset($objectAttrs['FAIstate'])){ $objectAttrs['FAIstate'] .= "|removed"; @@ -361,7 +361,7 @@ class fai_func echo "Create an empty placeholder in follwing release ".$key; print_a($objectAttrs); } - fai_func::save_FAI_object($key,$objectAttrs); + FAI::save_FAI_object($key,$objectAttrs); } } }else{ @@ -373,7 +373,7 @@ class fai_func echo "Copy current objects original attributes to next release ".$key; print_a($parent_attrs); } - fai_func::save_FAI_object($key,$parent_attrs); + FAI::save_FAI_object($key,$parent_attrs); } } @@ -381,7 +381,7 @@ class fai_func echo "Saving current object".$parent_obj; print_a($objectAttrs); } - fai_func::save_FAI_object($parent_obj,$objectAttrs); + FAI::save_FAI_object($parent_obj,$objectAttrs); if(($parent_obj != $Current_DN)){ msg_dialog::display(_("Error"), sprintf(_("Error, following objects should be equal '%s' and '%s'"),$parent_obj,$Current_DN), ERROR_DIALOG); @@ -402,8 +402,8 @@ class fai_func $ldap->cd($config->current['BASE']); /* Collect some basic informations and initialize some variables */ - $base_release = fai_func::get_release_dn($Current_DN); - $previous_releases = array_reverse(fai_func:: get_previous_releases_of_this_release($base_release,true)); + $base_release = FAI::get_release_dn($Current_DN); + $previous_releases = array_reverse(FAI:: get_previous_releases_of_this_release($base_release,true)); $Kill = array(); $Skip = array(); @@ -414,7 +414,7 @@ class fai_func foreach($previous_releases as $release){ /* Get fai departments */ - $deps_to_search = fai_func::get_FAI_departments($release); + $deps_to_search = FAI::get_FAI_departments($release); /* For every single department (ou=hoos,ou ..) */ foreach($deps_to_search as $fai_base){ @@ -527,10 +527,10 @@ class fai_func $ret = array(); /* Get base release */ - $base_release = fai_func::get_release_dn($dn); + $base_release = FAI::get_release_dn($dn); /* Get previous release dns */ - $sub_releases = fai_func:: get_sub_releases_of_this_release($base_release); + $sub_releases = FAI:: get_sub_releases_of_this_release($base_release); /* Get dn suffix. Example "FAIvairableEntry=keksdose,FAIvariable=Keksregal," */ # $dn_suffix = str_ireplace($base_release,"",$dn); @@ -562,13 +562,13 @@ class fai_func $previous_releases= array(); /* Get base release */ - $base_release = fai_func::get_release_dn($dn); + $base_release = FAI::get_release_dn($dn); if($include_myself){ $previous_releases[] = $base_release; } /* Get previous release dns */ - $tmp = fai_func:: get_previous_releases_of_this_release($base_release,true); + $tmp = FAI:: get_previous_releases_of_this_release($base_release,true); foreach($tmp as $release){ $previous_releases[] = $release; } @@ -621,7 +621,7 @@ class fai_func $new_dn .= $config->current['BASE']; /* check if this dn is a release */ - if(fai_func::is_release_department($new_dn)){ + if(FAI::is_release_department($new_dn)){ if($flat){ $ret[$id] = $new_dn; }else{ @@ -658,12 +658,12 @@ class fai_func /* Get sub release departments of this department */ if(in_array("FAIbranch",$attr['objectClass'])) { if($flat){ - $tmp = fai_func:: get_sub_releases_of_this_release($attr['dn'],$flat); + $tmp = FAI:: get_sub_releases_of_this_release($attr['dn'],$flat); foreach($tmp as $dn => $value){ $res[$dn]=$value; } }else{ - $res[$attr['dn']] = fai_func:: get_sub_releases_of_this_release($attr['dn']); + $res[$attr['dn']] = FAI:: get_sub_releases_of_this_release($attr['dn']); } } } @@ -727,7 +727,7 @@ class fai_func $new_dn .= $config->current['BASE']; /* Check if this dn is a release dn */ - if(fai_func::is_release_department($new_dn)){ + if(FAI::is_release_department($new_dn)){ return($new_dn); } diff --git a/gosa-core/plugins/admin/fai/class_faiHook.inc b/gosa-core/plugins/admin/fai/class_faiHook.inc index 22da2e5a2..f65d06d1c 100644 --- a/gosa-core/plugins/admin/fai/class_faiHook.inc +++ b/gosa-core/plugins/admin/fai/class_faiHook.inc @@ -404,21 +404,21 @@ class faiHook extends plugin $ldap->cd ($this->dn); $faifilter = session::get('faifilter'); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->SubObjects as $name => $obj){ - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); if($faifilter['branch'] == "main"){ $use_dn = $obj['dn']; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); } $this->handle_post_events("remove"); } @@ -456,7 +456,7 @@ class faiHook extends plugin $ldap = $this->config->get_ldap_link(); - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/hook with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ @@ -537,13 +537,13 @@ class faiHook extends plugin } if($obj['status'] == "delete"){ - fai_func::prepare_to_save_FAI_object($sub_dn,array(),true); + FAI::prepare_to_save_FAI_object($sub_dn,array(),true); $this->handle_post_events("remove"); }elseif($obj['status'] == "edited"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("modify"); }elseif($obj['status']=="new"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("add"); } $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); diff --git a/gosa-core/plugins/admin/fai/class_faiManagement.inc b/gosa-core/plugins/admin/fai/class_faiManagement.inc index 542d9e714..6b9c08dde 100644 --- a/gosa-core/plugins/admin/fai/class_faiManagement.inc +++ b/gosa-core/plugins/admin/fai/class_faiManagement.inc @@ -284,8 +284,8 @@ class faiManagement extends plugin $this->dialog->by_object[$type[1]]->remove_from_parent (); unset ($this->dialog); $this->dialog= FALSE; - $to_del = fai_func::clean_up_releases($dn); - fai_func::save_release_changes_now(); + $to_del = FAI::clean_up_releases($dn); + FAI::save_release_changes_now(); foreach($to_del as $dn){ $ldap->rmdir_recursive($dn); @@ -355,8 +355,8 @@ class faiManagement extends plugin $this->dialog->by_object[$type[1]]->remove_from_parent (); unset ($this->dialog); $this->dialog= FALSE; - $to_del = fai_func::clean_up_releases($this->dn); - fai_func::save_release_changes_now(); + $to_del = FAI::clean_up_releases($this->dn); + FAI::save_release_changes_now(); foreach($to_del as $dn){ $ldap->rmdir_recursive($dn); @@ -786,7 +786,7 @@ class faiManagement extends plugin } }else{ $this->dialog->save(); - fai_func::save_release_changes_now(); + FAI::save_release_changes_now(); if (!isset($_POST['edit_apply'])){ del_lock ($this->dn); unset($this->dialog); @@ -888,7 +888,7 @@ class faiManagement extends plugin if(!$base){ $base = session::get('CurrentMainBase'); } - $tmp = fai_func::get_all_releases_from_base($base,true); + $tmp = FAI::get_all_releases_from_base($base,true); foreach($tmp as $dn => $name){ $ret[$name]=$dn; } @@ -933,7 +933,7 @@ class faiManagement extends plugin $this->base = $base; $this->set_acl_base($this->base); - $this->lock_type = fai_func::get_release_tag(fai_func::get_release_dn($base)); + $this->lock_type = FAI::get_release_tag(FAI::get_release_dn($base)); /* Create a new list of FAI object * Generate List of Partitions,Hooks,Scripts,Templates,Profiles ... @@ -956,7 +956,7 @@ class faiManagement extends plugin $filter = "(&(|".$filter.")(cn=$Regex))"; /* Get resolved release dependencies */ - $tmp = fai_func::get_all_objects_for_given_base($base,$filter); + $tmp = FAI::get_all_objects_for_given_base($base,$filter); /* Ge listed ldap objects */ $ldap = $this->config->get_ldap_link(); @@ -1128,7 +1128,7 @@ class faiManagement extends plugin /* Get dialog */ $data = $this->CopyPasteHandler->execute(); - fai_func::save_release_changes_now(); + FAI::save_release_changes_now(); /* Return dialog data */ if(!empty($data)){ diff --git a/gosa-core/plugins/admin/fai/class_faiPackage.inc b/gosa-core/plugins/admin/fai/class_faiPackage.inc index 2e62249bb..9938e2142 100644 --- a/gosa-core/plugins/admin/fai/class_faiPackage.inc +++ b/gosa-core/plugins/admin/fai/class_faiPackage.inc @@ -336,23 +336,23 @@ class faiPackage extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->dn); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->ConfiguredPackages as $pkgname => $attrs){ foreach($attrs as $name => $attr){ $pkgdn = "FAIvariable=".$name.",".$this->dn; - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $pkgdn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $pkgdn); if($faifilter['branch'] == "main"){ $use_dn = $obj['dn']; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); } } $this->handle_post_events("remove"); @@ -492,7 +492,7 @@ class faiPackage extends plugin $this->attrs['FAIdebianSection'][] = $sec; } - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/package list with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ @@ -534,7 +534,7 @@ class faiPackage extends plugin } if(in_array($pkgattrs['FAIvariableType'],array("boolean","multiselect","password","select","string","text"))){ - fai_func::prepare_to_save_FAI_object($pkgdn,$pkgattrs); + FAI::prepare_to_save_FAI_object($pkgdn,$pkgattrs); } /* Handle tagging */ diff --git a/gosa-core/plugins/admin/fai/class_faiPartitionTable.inc b/gosa-core/plugins/admin/fai/class_faiPartitionTable.inc index 55827a6a4..1b4931ca7 100644 --- a/gosa-core/plugins/admin/fai/class_faiPartitionTable.inc +++ b/gosa-core/plugins/admin/fai/class_faiPartitionTable.inc @@ -346,32 +346,32 @@ class faiPartitionTable extends plugin $ldap->cd ($this->dn); $faifilter = session::get('faifilter'); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->disks as $disk){ $disk_dn = "cn=".$disk['cn'].",".$this->dn; - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $disk_dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $disk_dn); if($faifilter['branch'] == "main"){ $use_dn = $disk_dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); foreach($disk['partitions'] as $key => $partition){ $partition_dn= "FAIpartitionNr=".$partition['FAIpartitionNr'].",".$disk_dn; - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $partition_dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $partition_dn); if($faifilter['branch'] == "main"){ $use_dn = $disk_dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); } } } @@ -414,7 +414,7 @@ class faiPartitionTable extends plugin $ldap = $this->config->get_ldap_link(); - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/partition table with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ @@ -461,13 +461,13 @@ class faiPartitionTable extends plugin } if($disk['status'] == "delete"){ - fai_func::prepare_to_save_FAI_object($disk_dn,array(),true); + FAI::prepare_to_save_FAI_object($disk_dn,array(),true); $this->handle_post_events("remove"); }elseif($disk['status'] == "edited"){ - fai_func::prepare_to_save_FAI_object($disk_dn,$disk_attrs); + FAI::prepare_to_save_FAI_object($disk_dn,$disk_attrs); $this->handle_post_events("modify"); }elseif($disk['status']=="new"){ - fai_func::prepare_to_save_FAI_object($disk_dn,$disk_attrs); + FAI::prepare_to_save_FAI_object($disk_dn,$disk_attrs); $this->handle_post_events("add"); } @@ -512,13 +512,13 @@ class faiPartitionTable extends plugin } if($partition['status'] == "delete"){ - fai_func::prepare_to_save_FAI_object($partition_dn,array(),true); + FAI::prepare_to_save_FAI_object($partition_dn,array(),true); $this->handle_post_events("remove"); }elseif($partition['status'] == "edited"){ - fai_func::prepare_to_save_FAI_object($partition_dn,$partition_attrs); + FAI::prepare_to_save_FAI_object($partition_dn,$partition_attrs); $this->handle_post_events("modify"); }elseif($partition['status']=="new"){ - fai_func::prepare_to_save_FAI_object($partition_dn,$partition_attrs); + FAI::prepare_to_save_FAI_object($partition_dn,$partition_attrs); $this->handle_post_events("add"); } diff --git a/gosa-core/plugins/admin/fai/class_faiProfile.inc b/gosa-core/plugins/admin/fai/class_faiProfile.inc index 382f09baf..cd325b475 100644 --- a/gosa-core/plugins/admin/fai/class_faiProfile.inc +++ b/gosa-core/plugins/admin/fai/class_faiProfile.inc @@ -370,13 +370,13 @@ class faiProfile extends plugin $ldap->cd ($this->dn); $faifilter = session::get('faifilter'); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } new log("remove","fai/".get_class($this),$use_dn,$this->attributes); - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); $this->handle_post_events("remove"); } @@ -440,7 +440,7 @@ class faiProfile extends plugin $this->attrs['FAIclass']=trim($this->FAIclass); - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); if($this->initially_was_account){ new log("modify","fai/".get_class($this),$this->dn,$this->attributes); diff --git a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc index 38dc606b6..8963973e3 100644 --- a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc +++ b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc @@ -32,7 +32,7 @@ class faiProfileEntry extends plugin $filter = "(|(objectClass=FAIscript)(objectClass=FAItemplate)(objectClass=FAIhook)". "(objectClass=FAIvariable)(objectClass=FAIpartitionTable)(objectClass=FAIpackageList))"; - $FAI_objects = fai_func::get_all_objects_for_given_base($base,$filter,true); + $FAI_objects = FAI::get_all_objects_for_given_base($base,$filter,true); /* Create array with categories to be able to sort different types of objects */ $categories = array("FAIscript" => "faiScript", diff --git a/gosa-core/plugins/admin/fai/class_faiScript.inc b/gosa-core/plugins/admin/fai/class_faiScript.inc index 3f3ba1fbd..68a58e016 100644 --- a/gosa-core/plugins/admin/fai/class_faiScript.inc +++ b/gosa-core/plugins/admin/fai/class_faiScript.inc @@ -438,21 +438,21 @@ class faiScript extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->dn); $faifilter = session::get('faifilter'); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } new log("remove","fai/".get_class($this),$use_dn,$this->attributes); - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); foreach($this->SubObjects as $name => $obj){ - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); if($faifilter['branch'] == "main"){ $use_dn = $obj['dn']; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); } $this->handle_post_events("remove"); } @@ -503,7 +503,7 @@ class faiScript extends plugin $ldap = $this->config->get_ldap_link(); - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); show_ldap_error($ldap->get_error(), sprintf(_("Creating of FAI/script with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ @@ -587,13 +587,13 @@ class faiScript extends plugin } if($obj['status'] == "delete"){ - fai_func::prepare_to_save_FAI_object($sub_dn,array(),true); + FAI::prepare_to_save_FAI_object($sub_dn,array(),true); $this->handle_post_events("remove"); }elseif($obj['status'] == "edited"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("modify"); }elseif($obj['status']=="new"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("add"); } diff --git a/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc b/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc index 093378a68..f2bdd51f1 100644 --- a/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc +++ b/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc @@ -162,7 +162,7 @@ class faiSummaryTab extends plugin{ if(!$base){ $base = $this->base; } - return(fai_func::get_all_releases_from_base($base,true)); + return(FAI::get_all_releases_from_base($base,true)); } @@ -383,7 +383,7 @@ class faiSummaryTab extends plugin{ { $ldap = $this->config->get_ldap_link(); $dn = $this->Releases [$this->Release]; - $resolvedClasses = fai_func::get_all_objects_for_given_base($dn,"(&(objectClass=FAIclass)(cn=".$class."))"); + $resolvedClasses = FAI::get_all_objects_for_given_base($dn,"(&(objectClass=FAIclass)(cn=".$class."))"); /* Try to fetch all types of fai objects with the given cn */ foreach($resolvedClasses as $obj){ diff --git a/gosa-core/plugins/admin/fai/class_faiTemplate.inc b/gosa-core/plugins/admin/fai/class_faiTemplate.inc index b3e24e863..b13104b30 100644 --- a/gosa-core/plugins/admin/fai/class_faiTemplate.inc +++ b/gosa-core/plugins/admin/fai/class_faiTemplate.inc @@ -388,20 +388,20 @@ class faiTemplate extends plugin $ldap->cd ($this->dn); $faifilter = session::get('faifilter'); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->SubObjects as $name => $obj){ - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); if($faifilter['branch'] == "main"){ $use_dn = $obj['dn']; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); } $this->handle_post_events("remove"); } @@ -434,7 +434,7 @@ class faiTemplate extends plugin $ldap = $this->config->get_ldap_link(); - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/template with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ @@ -506,13 +506,13 @@ class faiTemplate extends plugin } if($obj['status'] == "delete"){ - fai_func::prepare_to_save_FAI_object($sub_dn,array(),true); + FAI::prepare_to_save_FAI_object($sub_dn,array(),true); $this->handle_post_events("remove"); }elseif($obj['status'] == "edited"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("modify"); }elseif($obj['status']=="new"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("add"); } diff --git a/gosa-core/plugins/admin/fai/class_faiVariable.inc b/gosa-core/plugins/admin/fai/class_faiVariable.inc index 32f26c1b9..278710e72 100644 --- a/gosa-core/plugins/admin/fai/class_faiVariable.inc +++ b/gosa-core/plugins/admin/fai/class_faiVariable.inc @@ -285,20 +285,20 @@ class faiVariable extends plugin $ldap->cd ($this->dn); $faifilter = session::get('faifilter'); - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn); if($faifilter['branch'] == "main"){ $use_dn = $this->dn; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->SubObjects as $name => $obj){ - $use_dn = preg_replace("/".normalizePreg(fai_func::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); + $use_dn = preg_replace("/".normalizePreg(FAI::get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']); if($faifilter['branch'] == "main"){ $use_dn = $obj['dn']; } - fai_func::prepare_to_save_FAI_object($use_dn,array(),true); + FAI::prepare_to_save_FAI_object($use_dn,array(),true); } $this->handle_post_events("remove"); } @@ -336,7 +336,7 @@ class faiVariable extends plugin plugin::save(); $ldap = $this->config->get_ldap_link(); - fai_func::prepare_to_save_FAI_object($this->dn,$this->attrs); + FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/variable with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ @@ -402,13 +402,13 @@ class faiVariable extends plugin } if($obj['status'] == "delete"){ - fai_func::prepare_to_save_FAI_object($sub_dn,array(),true); + FAI::prepare_to_save_FAI_object($sub_dn,array(),true); $this->handle_post_events("remove"); }elseif($obj['status'] == "edited"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("modify"); }elseif($obj['status']=="new"){ - fai_func::prepare_to_save_FAI_object($sub_dn,$tmp); + FAI::prepare_to_save_FAI_object($sub_dn,$tmp); $this->handle_post_events("add"); } diff --git a/gosa-core/plugins/admin/systems/class_workstationStartup.inc b/gosa-core/plugins/admin/systems/class_workstationStartup.inc index a63fdd327..90ba14cc4 100644 --- a/gosa-core/plugins/admin/systems/class_workstationStartup.inc +++ b/gosa-core/plugins/admin/systems/class_workstationStartup.inc @@ -1101,7 +1101,7 @@ class workstartup extends plugin $filter = "(|(objectClass=FAIpackageList)(objectClass=FAItemplate)(objectClass=FAIvariable)". "(objectClass=FAIscript)(objectClass=FAIhook)(objectClass=FAIprofile)". "(objectClass=FAIpartitionTable))"; - $list = fai_func::get_all_objects_for_given_base($base,$filter,TRUE); + $list = FAI::get_all_objects_for_given_base($base,$filter,TRUE); foreach($list as $attrs){ $info = $this->analyse_fai_object($attrs); if(count($info)){ -- 2.30.2