From: hickert Date: Fri, 7 Jul 2006 11:35:15 +0000 (+0000) Subject: Fixed save X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d939fc5f3f6fe2d65e3bccbebf52ac5ded5b95cc;p=gosa.git Fixed save git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4048 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions_FAI.inc b/include/functions_FAI.inc index e7c7380c7..de593a7ae 100644 --- a/include/functions_FAI.inc +++ b/include/functions_FAI.inc @@ -198,7 +198,7 @@ function save_release_changes_now() while(isset($_SESSION['FAI_objects_to_save'][$sub_name])){ - $to_save[strlen($sub_name)."-".$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); } @@ -208,6 +208,15 @@ function save_release_changes_now() /* Sort list of objects that must be saved, and ensure that container objects are safed, before their childs are saved */ ksort($to_save); + + $tmp = array(); + foreach($to_save as $SubObjects){ + foreach($SubObjects as $object){ + $tmp[] = $object; + } + } + + $to_save = $tmp; /* Save objects and manage the correct release behavior*/ foreach($to_save as $save){ @@ -430,6 +439,8 @@ function save_FAI_object($dn,$attrs) global $config; $ldap = $config->get_ldap_link(); $ldap->cd($config->current['BASE']); + echo $dn; + print_a($attrs); $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $dn)); $ldap->cd($dn);