summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e553a0e)
raw | patch | inline | side by side (parent: e553a0e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Jul 2006 11:28:31 +0000 (11:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Jul 2006 11:28:31 +0000 (11:28 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4047 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions_FAI.inc | patch | blob | history |
index e7e14d6758317ef11481042e81812e2b1cdc47e7..e7c7380c7be70b351a18e0f6edcc8935237e1a81 100644 (file)
@@ -148,14 +148,16 @@ function prepare_to_save_FAI_object($Current_DN,$objectAttrs,$removed = false)
/* Get some basic informations */
$parent_obj = get_parent_release_object($Current_DN);
- $ldap->cat($parent_obj,array("*"));
- $attrs = prepare_ldap_fetch_to_be_saved($ldap->fetch());
+ if(!empty($parent_obj)){
+ $ldap->cat($parent_obj,array("*"));
+ $attrs = prepare_ldap_fetch_to_be_saved($ldap->fetch());
- if(!array_diff_FAI( $attrs,$objectAttrs)){
- $addObj['diff'] = FALSE;
- }
+ if(!array_diff_FAI( $attrs,$objectAttrs)){
+ $addObj['diff'] = FALSE;
+ }
+ }
}
-
+
$_SESSION['FAI_objects_to_save'][$Current_DN] = $addObj;
}
/* Variable init*/
$to_save = array();
+
/* check which attributes must realy be saved */
foreach($_SESSION['FAI_objects_to_save'] as $Current_DN => $object){
if($object['diff']){
$sub_name = $Current_DN;
while(isset($_SESSION['FAI_objects_to_save'][$sub_name])){
- $to_save[strlen($sub_name)] = $_SESSION['FAI_objects_to_save'][$sub_name];
+
+ $to_save[strlen($sub_name)."-".$sub_name] = $_SESSION['FAI_objects_to_save'][$sub_name];
unset($_SESSION['FAI_objects_to_save'][$sub_name]);
$sub_name = preg_replace('/^[^,]+,/', '', $sub_name);
}
function save_FAI_object($dn,$attrs)
{
- print_a(array($dn,$attrs));
global $config;
$ldap = $config->get_ldap_link();
$ldap->cd($config->current['BASE']);