Code

Do not remove classes/plugin from session if a lock was removed
[gosa.git] / gosa-core / plugins / admin / departments / main.inc
index e3a64da8a04878d62f65e65221cc79bdeae16379..8eecd8276015cdb0b69de9570c79c687be5a0448 100644 (file)
@@ -24,7 +24,6 @@ if ($remove_lock){
         if(session::is_set('department')){
                 $department = session::get('department');
                 $department->remove_lock();
-                session::un_set ('department');
         }
 } else {
        /* Create usermanagement object on demand */
@@ -38,15 +37,14 @@ if ($remove_lock){
        $output= $department->execute();
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+       if (get_object_info() != ""){
+               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(get_object_info()));
        } else {
                $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"));
        }
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('department');
        }