Code

Template update .
[gosa.git] / gosa-plugins / gofax / gofax / blocklists / class_blocklistManagement.inc
index c7e1175c6ac5ad7cc0935403d97ab92d64c36385..ae3ee7a5a16c028cb996f29cd5bf0049de1a90c3 100644 (file)
@@ -16,7 +16,7 @@ class blocklist extends plugin
     $this->ui     = $ui;
     $this->dn     = "";
     $this->config = &$config;
-    $this->base = $_SESSION['CurrentMainBase']
+    $this->base  = session::get('CurrentMainBase')
     $this->DivListBlocklist = new divListBlocklist($this->config,$this);
 
     /* Initialize copy&paste queue */
@@ -31,7 +31,7 @@ class blocklist extends plugin
     /* Call parent execute */
     plugin::execute();
 
-    $_SESSION['LOCK_VARS_TO_USE'] = array("/^goFaxBlocklist_/","/^act$/","/^id$/","/^remove_multiple_blocklists/","/^item_selected/");
+    session::set('LOCK_VARS_TO_USE',array("/^goFaxBlocklist_/","/^act$/","/^id$/","/^remove_multiple_blocklists/","/^item_selected/"));
 
     /***************
       Init vars 
@@ -124,7 +124,7 @@ class blocklist extends plugin
 
       del_lock ($this->dn);
       $this->dialog = NULL;
-      unset($_SESSION['objectinfo']);
+      session::un_set('objectinfo');
     }
 
 
@@ -146,11 +146,11 @@ class blocklist extends plugin
           del_lock ($this->dn);
           $this->dn= "";
           $this->dialog = NULL;
-          unset($_SESSION['objectinfo']);
+          session::un_set('objectinfo');
         }
       } else {
         /* Errors found, show message */
-        show_errors ($message);
+        msgDialog::displayChecks($message);
       }
     }
 
@@ -180,7 +180,7 @@ class blocklist extends plugin
       }else{
         add_lock ($this->dn, $this->ui->dn);
       }
-      $_SESSION['objectinfo']= trim($this->dn);
+      session::set('objectinfo',trim($this->dn));
       $this->dialog = new faxblocktabs($this->config,$this->config->data['TABS']['FAXBLOCKTABS'],$this->dn);
       $this->dialog->set_acl_base($this->dn);
     }    
@@ -244,7 +244,7 @@ class blocklist extends plugin
           $this->dialog->delete();
           $this->dialog = NULL;
         } else {
-          print_red (sprintf(_("You are not allowed to delete the blocklist '%s'!"),$dn));
+          msg_dialog::display(_("Permission error"), sprintf(_("You have not permission to delete '%s'!"), $dn), ERROR_DIALOG);
         }
         /* Remove lock file after successfull deletion */
         del_lock ($dn);
@@ -277,7 +277,7 @@ class blocklist extends plugin
 
       /* Check locking */
       if (($user= get_lock($this->dn)) != ""){
-        $_SESSION['dn']= $this->dn;
+        session::set('dn',$this->dn);
         return(gen_locked_message($user, $this->dn));
       } else {
 
@@ -302,7 +302,7 @@ class blocklist extends plugin
         $this->dialog = NULL;
         del_lock ($this->dn);
       } else {
-        print_red (_("You have no permission to remove this blocklist."));
+        msg_dialog::display(_("Permission error"), _("You have not permission to delete this entry!"), ERROR_DIALOG);
       }
     }
 
@@ -452,12 +452,9 @@ class blocklist extends plugin
     /* Return C&P dialog */
     if($this->start_pasting_copied_objects && $this->CopyPasteHandler->entries_queued()){
 
-      /* Load entry from queue and set base */
-      $this->CopyPasteHandler->load_entry_from_queue();
-      $this->CopyPasteHandler->SetVar("base",$this->DivListBlocklist->selectedBase);
-
       /* Get dialog */
       $data = $this->CopyPasteHandler->execute();
+      $this->CopyPasteHandler->SetVar("base",$this->DivListBlocklist->selectedBase);
 
       /* Return dialog data */
       if(!empty($data)){