Code

Moved direct session access of 'objectinfo' into functions inc.
[gosa.git] / gosa-plugins / sudo / admin / sudo / main.inc
index 2acf8a62b7136fe960647bc10c7e1d59b24be282..bfb7e2596068dcf77c40d5a5277410edd2849e68 100644 (file)
@@ -24,7 +24,6 @@ if ($remove_lock){
   if(session::is_set('sudoManagement')){
     $sudoManagement = session::get('sudoManagement');
     $sudoManagement->remove_lock();
-    del_lock ($ui->dn);
     session::un_set ('sudoManagement');
   }
 } else {
@@ -37,20 +36,19 @@ if ($remove_lock){
   $output= $sudoManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
-    $display= print_header(get_template_path('images/sudo.png'),
+  if (get_object_info() != ""){
+    $display= print_header(get_template_path('plugins/sudo/images/sudo.png'),
                             _("Sudo role administration"), "<img alt=\"\" align=\"middle\" src=\"".
                             get_template_path('images/lists/locked.png')."\"> ".
-                            @LDAP::fix(session::get('objectinfo')));
+                            LDAP::fix(get_object_info()));
   } else {
-    $display= print_header(get_template_path('images/sudo.png'), _("Sudo role administration"));
+    $display= print_header(get_template_path('plugins/sudo/images/sudo.png'), _("Sudo role administration"));
   }
 
   $display.= $output;
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('sudoManagement');
   }