summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c51002a)
raw | patch | inline | side by side (parent: c51002a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Jan 2008 12:45:30 +0000 (12:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Jan 2008 12:45:30 +0000 (12:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8351 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/fai/class_faiHook.inc b/gosa-core/plugins/admin/fai/class_faiHook.inc
index 6aa43ba98b2c9382b683c6c5ef03ac8d8940a8fc..22da2e5a2f09d8d15e95cdf70df77d5b419a504d 100644 (file)
$use_dn = $this->dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
}
$this->handle_post_events("remove");
}
$ldap = $this->config->get_ldap_link();
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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){
}
if($obj['status'] == "delete"){
- prepare_to_save_FAI_object($sub_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($sub_dn,array(),true);
$this->handle_post_events("remove");
}elseif($obj['status'] == "edited"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::prepare_to_save_FAI_object($sub_dn,$tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::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_faiPackage.inc b/gosa-core/plugins/admin/fai/class_faiPackage.inc
index 3e4656b424a530512d89b47e9ecede175b0a8aa7..2e62249bbb10ca9cad5b4e631b5af3681b8cf9b3 100644 (file)
$use_dn = $this->dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
}
}
$this->handle_post_events("remove");
$this->attrs['FAIdebianSection'][] = $sec;
}
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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){
}
if(in_array($pkgattrs['FAIvariableType'],array("boolean","multiselect","password","select","string","text"))){
- prepare_to_save_FAI_object($pkgdn,$pkgattrs);
+ fai_func::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 29d3c86c94988648e1d863cfb0da82c2a2e5bb8a..55827a6a42c287d06a530bac5ff3d93dbcaf0a89 100644 (file)
$use_dn = $this->dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
if($faifilter['branch'] == "main"){
$use_dn = $disk_dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
foreach($disk['partitions'] as $key => $partition){
if($faifilter['branch'] == "main"){
$use_dn = $disk_dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
}
}
}
$ldap = $this->config->get_ldap_link();
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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){
}
if($disk['status'] == "delete"){
- prepare_to_save_FAI_object($disk_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($disk_dn,array(),true);
$this->handle_post_events("remove");
}elseif($disk['status'] == "edited"){
- prepare_to_save_FAI_object($disk_dn,$disk_attrs);
+ fai_func::prepare_to_save_FAI_object($disk_dn,$disk_attrs);
$this->handle_post_events("modify");
}elseif($disk['status']=="new"){
- prepare_to_save_FAI_object($disk_dn,$disk_attrs);
+ fai_func::prepare_to_save_FAI_object($disk_dn,$disk_attrs);
$this->handle_post_events("add");
}
}
if($partition['status'] == "delete"){
- prepare_to_save_FAI_object($partition_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($partition_dn,array(),true);
$this->handle_post_events("remove");
}elseif($partition['status'] == "edited"){
- prepare_to_save_FAI_object($partition_dn,$partition_attrs);
+ fai_func::prepare_to_save_FAI_object($partition_dn,$partition_attrs);
$this->handle_post_events("modify");
}elseif($partition['status']=="new"){
- prepare_to_save_FAI_object($partition_dn,$partition_attrs);
+ fai_func::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 fb6d1877e5bd54a93a50a389f0100784cbc80232..382f09bafd4af84dea1af5f74ddbfc4882bc31c1 100644 (file)
}
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
$this->handle_post_events("remove");
}
$this->attrs['FAIclass']=trim($this->FAIclass);
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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_faiScript.inc b/gosa-core/plugins/admin/fai/class_faiScript.inc
index af71b587f3b1a0ddedd2d55000af1491cd9864af..3f3ba1fbdef2f9283648a3eae4b84dbc9273cc8c 100644 (file)
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::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']);
if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
}
$this->handle_post_events("remove");
}
$ldap = $this->config->get_ldap_link();
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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){
}
if($obj['status'] == "delete"){
- prepare_to_save_FAI_object($sub_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($sub_dn,array(),true);
$this->handle_post_events("remove");
}elseif($obj['status'] == "edited"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::prepare_to_save_FAI_object($sub_dn,$tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::prepare_to_save_FAI_object($sub_dn,$tmp);
$this->handle_post_events("add");
}
diff --git a/gosa-core/plugins/admin/fai/class_faiTemplate.inc b/gosa-core/plugins/admin/fai/class_faiTemplate.inc
index 831f0c42748608ec941010d8524f1c71805d7995..b3e24e86335a267f051dcd787c38e23645fe9071 100644 (file)
$use_dn = $this->dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::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){
if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
}
$this->handle_post_events("remove");
}
$ldap = $this->config->get_ldap_link();
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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){
}
if($obj['status'] == "delete"){
- prepare_to_save_FAI_object($sub_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($sub_dn,array(),true);
$this->handle_post_events("remove");
}elseif($obj['status'] == "edited"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::prepare_to_save_FAI_object($sub_dn,$tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::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 24a5aed64f6e9aa61069ed52d8eb91a4d0c5bb3a..32f26c1b99733e387bf669a73d63b310616232ec 100644 (file)
$use_dn = $this->dn;
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::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){
if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
- prepare_to_save_FAI_object($use_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($use_dn,array(),true);
}
$this->handle_post_events("remove");
}
plugin::save();
$ldap = $this->config->get_ldap_link();
- prepare_to_save_FAI_object($this->dn,$this->attrs);
+ fai_func::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){
}
if($obj['status'] == "delete"){
- prepare_to_save_FAI_object($sub_dn,array(),true);
+ fai_func::prepare_to_save_FAI_object($sub_dn,array(),true);
$this->handle_post_events("remove");
}elseif($obj['status'] == "edited"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::prepare_to_save_FAI_object($sub_dn,$tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
- prepare_to_save_FAI_object($sub_dn,$tmp);
+ fai_func::prepare_to_save_FAI_object($sub_dn,$tmp);
$this->handle_post_events("add");
}
diff --git a/gosa-core/plugins/admin/fai/functions_FAI.inc b/gosa-core/plugins/admin/fai/functions_FAI.inc
index 2fd161d578cbd0146d4b58af9dbb62b65510666e..822860a3e007a11df5fb5e904ccb9ffe531198e8 100644 (file)
define("DEBUG_FAI_FUNC",FALSE);
-
-
class fai_func
{
This function resolves the releases
from base up to the given dn.
*/
-static function get_all_objects_for_given_base($Current_DN,$filter,$detailed = false)
+ static function get_all_objects_for_given_base($Current_DN,$filter,$detailed = false)
{
global $config;
$ldap = $config->get_ldap_link();
/* Return all relevant FAI departments */
-static function get_FAI_departments($suffix = "")
+ static function get_FAI_departments($suffix = "")
{
$arr = array("hooks","scripts","disk","packages","profiles","templates","variables");
$tmp = array();
/* Return all releases within the given base */
-static function get_all_releases_from_base($dn,$appendedName=false)
+ static function get_all_releases_from_base($dn,$appendedName=false)
{
global $config;
/* Add this object to list of objects, that must be checked for release saving */
-static function prepare_to_save_FAI_object($Current_DN,$objectAttrs,$removed = false)
+ static function prepare_to_save_FAI_object($Current_DN,$objectAttrs,$removed = false)
{
/* Get ldap object */
global $config;
@@ -168,7 +166,7 @@ static function prepare_to_save_FAI_object($Current_DN,$objectAttrs,$removed = f
/* Detect differences in attribute arrays */
-static function array_diff_FAI($ar1,$ar2)
+ static function array_diff_FAI($ar1,$ar2)
{
if((!isset($ar1['description'])) || (isset($ar1['description']) && (count($ar1['description']) == 0))){
}
-static function arr_diff($ar1,$ar2)
+ static function arr_diff($ar1,$ar2)
{
foreach($ar1 as $ak1 => $av1){
if(!isset($ar2[$ak1]) || (!($av1 === $ar2[$ak1]))){
/* check which objects must be saved, and save them */
-static function save_release_changes_now()
+ static function save_release_changes_now()
{
/* Variable init*/
$to_save = array();
/* this function will remove all unused (deleted) objects,
that have no parent object */
-static function clean_up_releases($Current_DN)
+ static function clean_up_releases($Current_DN)
{
global $config;
$ldap = $config->get_ldap_link();
/* Remove numeric index and 'count' from ldap->fetch result */
-static function prepare_ldap_fetch_to_be_saved($attrs)
+ static function prepare_ldap_fetch_to_be_saved($attrs)
{
foreach($attrs as $key => $value){
if(is_numeric($key) || ($key == "count") || ($key == "dn")){
/* Save given attrs to specified dn*/
-static function save_FAI_object($dn,$attrs)
+ static function save_FAI_object($dn,$attrs)
{
global $config;
$ldap = $config->get_ldap_link();
/* Return FAIstate freeze branch or "" for specified release department */
-static function get_release_tag($dn)
+ static function get_release_tag($dn)
{
global $config;
$ldap = $config->get_ldap_link();
}
-static function get_following_releases_that_inherit_this_object($dn)
+ static function get_following_releases_that_inherit_this_object($dn)
{
global $config;
$ldap = $config->get_ldap_link();
/* Get previous version of the object dn */
-static function get_parent_release_object($dn,$include_myself=true)
+ static function get_parent_release_object($dn,$include_myself=true)
{
global $config;
$ldap = $config->get_ldap_link();
/* return release names of all parent releases */
-static function get_previous_releases_of_this_release($dn,$flat)
+ static function get_previous_releases_of_this_release($dn,$flat)
{
global $config;
$ldap = $config->get_ldap_link();
/* This function returns all sub release names, recursivly */
-static function get_sub_releases_of_this_release($dn,$flat = false)
+ static function get_sub_releases_of_this_release($dn,$flat = false)
{
global $config;
$res = array();
/* Check if the given department is a release department */
-static function is_release_department($dn)
+ static function is_release_department($dn)
{
global $config;
$ldap = $config->get_ldap_link();
/* This function returns the dn of the object release */
-static function get_release_dn($Current_DN)
+ static function get_release_dn($Current_DN)
{
global $config;
$ldap = $config->get_ldap_link();