Code

Updated divlists.
[gosa.git] / plugins / admin / fai / main.inc
index 61a919e15ec4a1ca9be01e1df050b5bb1e120bef..ab6749d44c02d515ce2f7e6334c408590f39e09d 100644 (file)
@@ -29,26 +29,26 @@ if ($remove_lock){
        /* Create usermanagement object on demand */
        if (!isset($_SESSION['FAI']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
                $_SESSION['FAI']= new faiManagement($config, $ui);
+               $_SESSION['FAI']->set_acl_category("fai");
+               $_SESSION['FAI']->set_acl_base($_SESSION['CurrentMainBase']);
        }
        $FAI= $_SESSION['FAI'];
+       $FAI->save_object();
        $output= $FAI->execute();
 
-       /* Page header*/
-       if (isset($_SESSION['objectinfo'])){
-               $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".$_SESSION['objectinfo']);
-       } else {
-               $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"));
-       }
-
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
                del_lock ($ui->dn);
                sess_del ('FAI');
        }
-
-       /* Show and save dialog */
-       $FAI->save_object();
+       /* Page header*/
+       if (isset($_SESSION['objectinfo'])){
+               $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
+       } else {
+               $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"));
+       }
        $display.= $output;
+
        $_SESSION['FAI']= $FAI;
 }