Code

Moved direct session access of 'objectinfo' into functions inc.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 08:33:21 +0000 (08:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 08:33:21 +0000 (08:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13270 594d385d-05f5-0310-b6e9-bd551577e9d8

37 files changed:
gosa-core/html/main.php
gosa-core/include/functions.inc
gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
gosa-core/plugins/admin/ogroups/main.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/admin/users/main.inc
gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc
gosa-plugins/dfs/addons/godfs/main.inc
gosa-plugins/fai/admin/fai/class_faiHook.inc
gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
gosa-plugins/fai/admin/fai/class_faiScript.inc
gosa-plugins/fai/admin/fai/class_faiTemplate.inc
gosa-plugins/fai/admin/fai/class_faiVariable.inc
gosa-plugins/fai/admin/fai/main.inc
gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
gosa-plugins/gofax/gofax/blocklists/main.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc
gosa-plugins/gofon/gofon/conference/main.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc
gosa-plugins/gofon/gofon/macro/main.inc
gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/applications/main.inc
gosa-plugins/goto/admin/devices/class_deviceManagement.inc
gosa-plugins/goto/admin/devices/main.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/mimetypes/main.inc
gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc
gosa-plugins/sudo/admin/sudo/main.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/main.inc

index b086da606564fc8cc86c26b6d509510b8c1c3de4..1af6890acbdfe71dd547a1a389179317632dc678 100644 (file)
@@ -246,9 +246,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
 /* Load department list when plugin has changed. That is some kind of
    compromise between speed and beeing up to date */
 if (isset($_GET['reset'])){
-  if (session::is_set('objectinfo')){
-    session::un_set('objectinfo');
-  }
+  set_object_info();
 }
 
 /* show web frontend */
index 5d500d4b3238afbc06f1f8c28b0fef8ca70bbff5..8129514a28ce17ba7b53b0f150fb9caeb552bc82 100644 (file)
@@ -2807,6 +2807,17 @@ function cred_decrypt($input,$password) {
   return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $password, pack("H*", $input), MCRYPT_MODE_ECB, $iv);
 }
 
+function get_object_info()
+{
+  return(session::get('objectinfo'));
+}
+
+function set_object_info($str = "")
+{
+  echo "-->> $str <br>";
+  session::set('objectinfo',$str);
+}
+
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index b76a86214b3589e800927e89ac1599d541eda5e3..23cdbeb6d6655cb6388d0069dbdd02709a54f1d3 100644 (file)
@@ -204,7 +204,7 @@ class aclManagement extends plugin
         }
 
         /* Set ACL and move DN to the headline */
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
       }else{
         msg_dialog::display(_("Permission error"), msgPool::permModify(), ERROR_DIALOG);
       }
@@ -216,14 +216,14 @@ class aclManagement extends plugin
      ********************/
     if(isset($_POST['delete_lock'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Reset all relevant data, if we get a _cancel request */
     if (isset($_POST['edit_cancel'])){
       $this->remove_lock();
       $this->acltabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -397,7 +397,7 @@ class aclManagement extends plugin
 
           unset ($this->acltabs);
           $this->acltabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }
       } else {
         /* Ok. There seem to be errors regarding to the tab data,
index ed3a0582c91dba0866a98322483bd89d254a4a76..8e551a60f969711f02074e5691e4a58ed024b614 100644 (file)
@@ -40,8 +40,8 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
        $output= $macl->execute();
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL 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/acl/images/plugin.png'), _("ACL 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/acl/images/plugin.png'), _("ACL management"));
        }
index 5edf9e57a9ba3005084264f49d9d9f669d9e9b28..34e42046eaed6144318722fbf0de00db0d8c7a93 100644 (file)
@@ -176,7 +176,7 @@ class departmentManagement extends plugin
         $this->deptabs= new deptabs($this->config,$this->config->data['TABS'][$data['TAB']], $this->dn,"department");
         $this->deptabs->set_acl_base($this->dn);
 
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
       }
     }
 
@@ -359,7 +359,7 @@ class departmentManagement extends plugin
      }
      unset ($this->deptabs);
      $this->deptabs= NULL;
-     session::un_set('objectinfo');
+     set_object_info();
    }
 
 
@@ -373,7 +373,7 @@ class departmentManagement extends plugin
     if (isset($_POST['edit_cancel']) || isset($_POST['delete_cancel']) || isset($_POST['delete_department_confirm'])){
       $this->remove_lock();
       $this->deptabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Headpage or normal plugin screen? */
index 921be55f66b40968d723f7592109e0c651e626ff..565ed9f9874311fa2a2b72b1a4a8cd86658a68bc 100644 (file)
@@ -38,8 +38,8 @@ 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"));
        }
index f0045b3d50afa1126731c40ecf09145cd56556d8..6a25a28f50ccf619075cc4bdb678df6f5582585c 100644 (file)
@@ -268,7 +268,7 @@ class groupManagement extends plugin
           //$this->reload ();
           unset ($this->grouptab);
           $this->grouptab= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -303,7 +303,7 @@ class groupManagement extends plugin
       $tmp->lock_entries($this->ui->dn);
       if($tmp->multiple_available()){
         $this->grouptab = $tmp;
-        session::set('objectinfo',$this->grouptab->get_object_info());
+        set_object_info($this->grouptab->get_object_info());
       }
     }
 
@@ -328,7 +328,7 @@ class groupManagement extends plugin
       /* Register grouptab to trigger edit dialog */
       $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn);
       $this->grouptab->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -495,7 +495,7 @@ class groupManagement extends plugin
 
       /* Remove lock file after successfull deletion */
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -506,7 +506,7 @@ class groupManagement extends plugin
     /* Delete group canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
     
 
@@ -520,7 +520,7 @@ class groupManagement extends plugin
         $this->remove_lock();
       }
       $this->grouptab= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
index e402b2a7e2e8c3da71548b92962ea6b2b01510a3..5cb881575c7b04a137f11501f3184e9a78c0967c 100644 (file)
@@ -36,11 +36,11 @@ if ($remove_lock){
   $output= $groupManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'),
                            _("Group 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('plugins/groups/images/plugin.png'), _("Group administration"));
   }
index b4f98f9c67e67e26fc09ed67d30adc4327602f1d..05dbc79eadbaeb7d68beca142fb5fbcc5cc78709 100644 (file)
@@ -368,7 +368,7 @@ class ogroupManagement extends plugin
 
       /* Remove lock file after successfull deletion */
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -379,7 +379,7 @@ class ogroupManagement extends plugin
     /* Delete group canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -405,7 +405,7 @@ class ogroupManagement extends plugin
       /* Register grouptab to trigger edit dialog */
       $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups");
       $this->ogroup->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -434,7 +434,7 @@ class ogroupManagement extends plugin
 
           unset ($this->ogroup);
           $this->ogroup= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -458,7 +458,7 @@ class ogroupManagement extends plugin
     if ((isset($_POST['edit_cancel']))  && (isset($this->ogroup->dn))){
       $this->remove_lock();
       $this->ogroup= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
index 918c970aaf5f70714e55f565bc675a4a0c15e668..2b1a74025a9565878928baa2e341eef8cd2a6d70 100644 (file)
@@ -41,12 +41,12 @@ if ($remove_lock){
   $output= $ogroup->execute ();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'),
                           _("Object groups"),
                           "<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('plugins/ogroups/images/plugin.png'), _("Object groups"));
   }
index 98e2b87e9415b70d0a9e8be0ba5dd246ba07cb48..f5b8b6ecc19658492a65853c4c1224727d99ebdd 100644 (file)
@@ -323,7 +323,7 @@ class userManagement extends plugin
       $this->sn= "";
       $this->givenName= "";
       $this->uid= "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -372,7 +372,7 @@ class userManagement extends plugin
 
         /* User is allowed to change passwords, save 'dn' and 'acl' for next
            dialog. */
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
         return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
       } else {
         /* User is not allowed. Show message and cancel. */
@@ -412,7 +412,7 @@ class userManagement extends plugin
 
       /* Set ACL and move DN to the headline */
       $this->usertab->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -436,7 +436,7 @@ class userManagement extends plugin
       if($tmp->multiple_available()){
         $this->usertab = $tmp;
         $this->usertab->set_active_tab($s_tab);
-        session::set('objectinfo',$this->usertab->get_object_info());
+        set_object_info($this->usertab->get_object_info());
       }
     }
 
@@ -455,7 +455,7 @@ class userManagement extends plugin
       $this->sn= "";
       $this->givenName= "";
       $this->uid= "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -735,7 +735,7 @@ class userManagement extends plugin
 
           unset ($this->usertab);
           $this->usertab= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
         
           /* Reinitialize tab */
index eade63a44cf30cbd6c99457d76ba53a5ae0455f5..815f27ab9be06ec34995ae95f049bc5a4ae61eab 100644 (file)
@@ -39,12 +39,12 @@ if ($remove_lock){
   $output= $userManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header(get_template_path($userManagement->plIcon),
                            _("User administration"),
                            "<img alt=\"\" class=\"center\" 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($userManagement->plIcon),
                           _("User administration"));
index 5a29f61c35baee2498d99aae0248182de0854307..1774090f49f9f3c91fece5d61144b82adac6ecdc 100644 (file)
@@ -96,7 +96,7 @@ class dfsManagment extends plugin {
         $this->dfstab = new dfstabs($this->config, $this->config->data['TABS']['DFSTABS'], $this->dn);
         $this->dfstab->set_acl($this->acl);
         $this->dfstab->save_object();
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
       }
     } 
       
@@ -120,11 +120,11 @@ class dfsManagment extends plugin {
 
     # cancel pressed
     if (isset($_POST['edit_cancel'])) {
-      del_lock (session::get('objectinfo'));
+      del_lock (get_object_info());
       unset ($this->dfstab);
       $this->dfstab = NULL;
       $this->dn = "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     # delete pressed
@@ -148,11 +148,11 @@ class dfsManagment extends plugin {
              msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->basedn, LDAP_DEL, get_class()));
       }
       
-      del_lock (session::get('objectinfo'));
+      del_lock (get_object_info());
       unset ($this->dfstab);
       $this->dfstab = NULL;
       $this->dn = "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     # generate main page no tabs
index c658c098079333802dd89a2a931165724c767d52..524d166cf2d732e7e19a79ac50a17f7143f49884 100644 (file)
      }
  
      # create page header
-     if (session::is_set('objectinfo')) {
+     if (get_object_info() != "") {
        $display = print_header(get_template_path('plugins/dfs/images/dfs.png'), 
                                 _("Distributed File System Administration"),
                                 "<img alt=\"\" class=\"center\" src=\"".
                                 get_template_path('images/lists/locked.png').
-                                "\"> ".session::get('objectinfo'));
+                                "\"> ".get_object_info());
      } else {
        $display = print_header(get_template_path('plugins/dfs/images/dfs.png'),
                                 _("Distributed File System Administration"));
index d651382fc40be556e86d6f3f3a7b66e045a585f0..e71fc1b855f504c9007428c6ab98c1a7d3a75b1e 100644 (file)
@@ -158,7 +158,7 @@ class faiHook extends plugin
         $this->dialog->set_acl_base($this->acl_base_for_current_object($obj['dn']));
         $this->dialog->set_acl_category("fai");
 
-        session::set('objectinfo',$obj['dn']);
+        set_object_info($obj['dn']);
         $this->dialog->parent = &$this;
         $this->is_dialog=true;
       }
@@ -203,7 +203,7 @@ class faiHook extends plugin
         $this->dialog->acl = $this->acl;
         $this->dialog->set_acl_base($this->acl_base_for_current_object($obj['dn']));
         $this->dialog->set_acl_category("fai");
-        session::set('objectinfo',$obj['dn']);
+        set_object_info($obj['dn']);
         $this->dialog->parent = &$this;
         $this->is_dialog=true;
       }
index 1668c12505755ce81e1b40436479bc9a65c8d73e..dc7bac243abd6934baefd076afe959f6b55c2624 100644 (file)
@@ -462,7 +462,7 @@ class faiManagement extends plugin
           $this->dialog->by_object[$a_setup[1]]->FAIstate = $entry['FAIstate'];
           $this->dialog->set_acl_base($this->dn);
           $this->is_dialog  = true;
-          session::set('objectinfo',$this->dn);
+          set_object_info($this->dn);
         }
       }
     }
@@ -921,7 +921,7 @@ class faiManagement extends plugin
                if(isset($_POST['edit_cancel'])){
                        $this->dialog=FALSE;
                        $this->is_dialog = false;
-                       session::un_set('objectinfo');
+                       set_object_info();
       $this->remove_lock();
                }
 
@@ -973,7 +973,7 @@ class faiManagement extends plugin
           $this->remove_lock();
           $this->dialog=FALSE;
           $this->is_dialog=false;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
index 8ad852ab8abe65d06f5df53eca2f3f4347be5b33..c8b0cdc1439f56f376be3c1fd7706b26773e2ae7 100644 (file)
@@ -128,7 +128,7 @@ class faiPartitionTable extends plugin
      */    
 
     if($this->dn != "new"){
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
     if((isset($_POST['EditDisk']))&&(isset($_POST['disks']))){
@@ -144,10 +144,10 @@ class faiPartitionTable extends plugin
 
         /* Set object info string, which will be displayed in plugin info line */ 
         if(isset($this->disks[$Udisk]['dn'])){
-          session::set('objectinfo',$this->disks[$Udisk]['dn']);
+          set_object_info($this->disks[$Udisk]['dn']);
           $dn = $this->disks[$Udisk]['dn'];
         }else{
-          session::set('objectinfo',"");
+          set_object_info("");
           $dn = "new";
         }
 
index db8e38e68da18b904c6dcee6e003bacc3a2fb982..dc8359d929496a39098201dc74fc53dd58cdebf7 100644 (file)
@@ -144,7 +144,7 @@ class faiScript extends plugin
     }
 
     if($this->dn != "new"){
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
     /* File download requested */
@@ -199,7 +199,7 @@ class faiScript extends plugin
       $this->dialog->set_acl_category("fai");
 
       /* Assign some additional dialog informations like headline and parent  */
-      session::set('objectinfo',$obj['dn']);
+      set_object_info($obj['dn']);
       $this->dialog->parent = &$this;
       $this->is_dialog=true;
     }
index 0c2dca46dd7cb6853f95c1d43ebb397c85784abf..1a46f050dfc4b5da18688fe81a6e710593be9ca4 100644 (file)
@@ -134,7 +134,7 @@ class faiTemplate extends plugin
           $this->dialog->FAIstate = $this->FAIstate;
           $this->dialog->set_acl_category("fai");
 
-          session::set('objectinfo',$obj['dn']);
+          set_object_info($obj['dn']);
           $this->dialog->parent = &$this;
           $this->is_dialog=true;
         }
@@ -178,7 +178,7 @@ class faiTemplate extends plugin
         $this->dialog->FAIstate = $this->FAIstate;
         $this->dialog->acl = $this->acl;
         $this->dialog->set_acl_category("fai");
-        session::set('objectinfo',$obj['dn']);
+        set_object_info($obj['dn']);
         $this->dialog->parent = &$this;
         $this->is_dialog=true;
       }
@@ -200,7 +200,7 @@ class faiTemplate extends plugin
     }
 
     if($this->dn != "new"){
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
     /* Save Dialog */
index 6a9150e4e9e731ccabc17bd75fdcf7cb4899992e..0847d8842c3584d039447498b6a37c63d011f938 100644 (file)
@@ -99,7 +99,7 @@ class faiVariable extends plugin
     }
 
     if($this->dn != "new"){
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -113,7 +113,7 @@ class faiVariable extends plugin
       $this->dialog->set_acl_base($c_dn);
       $this->dialog->FAIstate = $this->FAIstate;
       $this->dialog->parent = &$this;
-      session::set('objectinfo',$this->SubObjects[$var]['dn']);
+      set_object_info($this->SubObjects[$var]['dn']);
       $this->is_dialog=true;
     }
     
index 88dfff1cc64c0eff4fae5791fec4ba14b76b1ef4..e58e59da5aae659ed5d7777d2e857b53d707508c 100644 (file)
@@ -40,8 +40,8 @@ if ($remove_lock){
                session::un_set ('FAI');
        }
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "<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($FAI->plIcon), _("Software deployment"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(get_object_info()));
        } else {
                $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"));
        }
index dc7007c8912c509c7c6ac301b89d504ba6c00dd4..99afef0db096ee12a7ec398f3efed9729621cfbe 100644 (file)
@@ -127,7 +127,7 @@ class blocklist extends plugin
 
       $this->remove_lock();
       $this->dialog = NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -149,7 +149,7 @@ class blocklist extends plugin
           $this->remove_lock();
           $this->dn= "";
           $this->dialog = NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -189,7 +189,7 @@ class blocklist extends plugin
       }else{
         add_lock ($this->dn, $this->ui->dn);
       }
-      session::set('objectinfo',trim($this->dn));
+      set_object_info(trim($this->dn));
       $this->dialog = new faxblocktabs($this->config,$this->config->data['TABS']['FAXBLOCKTABS'],$this->dn);
       $this->dialog->set_acl_base($this->dn);
     }    
index 36d9edb1ae142b1482e5e0ba1ff1fc3db032217f..8cc5c6e6ef2d6e746892d57d8b05b5b71a00b935 100644 (file)
@@ -22,8 +22,8 @@ if ($remove_lock){
        }
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist 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($blocklist->plIcon), _("Blocklist 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($blocklist->plIcon), _("Blocklist management"));
        }
index 14e6131e8849740305afc6876ba5452d59fea09e..4bf90de841760ec0aba6ff61af0e289c13cffcc1 100644 (file)
@@ -148,7 +148,7 @@ class phoneConferenceManagment extends plugin
       $this->conftab= NULL;
       $this->lognames= array();;
       $this->cn= "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -311,7 +311,7 @@ class phoneConferenceManagment extends plugin
       /* Register conftab to trigger edit dialog */
       $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference");
       $this->conftab->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -329,7 +329,7 @@ class phoneConferenceManagment extends plugin
         $this->dn= "new";
         $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference");
         $this->conftab->set_acl_base($dummy_dn);
-        session::un_set('objectinfo');
+        set_object_info();
       }
     }
 
@@ -355,7 +355,7 @@ class phoneConferenceManagment extends plugin
         if (!isset($_POST['edit_apply'])){
           $this->remove_lock();
           $this->conftab= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
index 1896d125b3880b6572444bdfb67c8536e9ed172a..1874c2cec6b7b4435a1a4b346f5c5bc4071df4e1 100644 (file)
@@ -34,8 +34,8 @@ if ($remove_lock){
        $output= $conference->execute();
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference 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/gofon/images/conference.png'), _("Conference 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/gofon/images/conference.png'), _("Conference management"));
        }
index 4dc2f7c8618bdca61f536ae4957e936fab41629f..faad636f7031c9ebbd0339a4f130cbb880822bf1 100644 (file)
@@ -168,7 +168,7 @@ class goFonMacro extends plugin
       $this->remove_lock();
       unset ($this->macrotabs);
       $this->macrotabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -201,7 +201,7 @@ class goFonMacro extends plugin
 
           unset ($this->macrotabs);
           $this->macrotabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -242,7 +242,7 @@ class goFonMacro extends plugin
         /* Register macrotabs to trigger edit dialog */
         $this->macrotabs= new macrotabs($this->config,
             $this->config->data['TABS']['MACROTABS'], $this->dn,"gofonmacro");
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
       }
     }
 
index 9231bc01cb07649e02718f467dcf824980139e59..474e032dc19948f4cfede3c5bf3bfb0deff549b0 100644 (file)
@@ -37,11 +37,11 @@ if ($remove_lock){
   $output= $macroManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header( get_template_path('images/macros.png'), 
                             _("Phone macro management"), 
                             "<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('plugins/gofon/images/macros.png'), _("Phone macro management"));
   }
index a8959a121096714a9bc8d63082bb03c41e4d8b1d..ddfb16123038a33a898cb866296d080cb6c8d5bf 100644 (file)
@@ -248,7 +248,7 @@ class applicationManagement extends plugin
     if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
       $this->remove_lock();
       $this->apptabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -279,7 +279,7 @@ class applicationManagement extends plugin
             $this->remove_lock();
           }
           $this->apptabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -322,7 +322,7 @@ class applicationManagement extends plugin
       }
       $this->apptabs->parent = &$this;
       $this->apptabs->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -500,7 +500,7 @@ class applicationManagement extends plugin
     /* Delete application canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Show tab dialog if object is present */
index f8233b272f252028ee8678a5dbf49d9b19784cb7..e65aac7fd91f690ef6769fe3c831e2091d031eea 100644 (file)
@@ -34,8 +34,8 @@ if ($remove_lock){
        $output= $applicationManagement->execute();
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($applicationManagement->plIcon), _("Application 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($applicationManagement->plIcon), _("Application 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($applicationManagement->plIcon), _("Application management"));
        }
index 7f2e02171774b5512d865770bea1a5deb55cc8de..1acd7d6fa5e0b22a47124e9b4789c925a6411969 100644 (file)
@@ -149,7 +149,7 @@ class deviceManagement extends plugin
     if (isset($_POST['edit_cancel']) && is_object($this->devicetabs)){
       $this->remove_lock();
       $this->devicetabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -179,7 +179,7 @@ class deviceManagement extends plugin
           }
           unset ($this->devicetabs);
           $this->devicetabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -219,7 +219,7 @@ class deviceManagement extends plugin
       /* Register devicetabs to trigger edit dialog */
       $this->devicetabs= new devicetabs($this->config,$this->config->data['TABS']['DEVICETABS'], $this->dn,"devices");
       $this->devicetabs->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -395,7 +395,7 @@ class deviceManagement extends plugin
     /* Delete device canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Show tab dialog if object is present */
index 00c39ba42838f649f38f93bdd0a346099ea3d4d5..432ee16439b929885f5feb080c89b38ef68d4f68 100644 (file)
@@ -37,8 +37,8 @@ if ($remove_lock){
   $output= $DeviceManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
-    $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device 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($DeviceManagement->plIcon), _("Hotplug device 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($DeviceManagement->plIcon), _("Hotplug device management"));
   }
index 397e0bee188e999fb033a9e293039d898f97d67c..f7be97b7e4aebb8e8f6bb4ccf5b0d660aadfa7ea 100644 (file)
@@ -259,7 +259,7 @@ class mimetypeManagement extends plugin
     if (isset($_POST['edit_cancel'])){
       $this->remove_lock();
       $this->mimetabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -288,7 +288,7 @@ class mimetypeManagement extends plugin
           }
           unset ($this->mimetabs);
           $this->mimetabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -331,7 +331,7 @@ class mimetypeManagement extends plugin
       }
       $this->mimetabs->parent = &$this;
       $this->mimetabs->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -509,7 +509,7 @@ class mimetypeManagement extends plugin
     /* Delete mime type canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Show tab dialog if object is present */
index fcfd5167ba63fa3ed0a20bffad942892022a0a7f..24268e02762937690e929f5404e9c833b22894fc 100644 (file)
@@ -37,8 +37,8 @@ if ($remove_lock){
   $output= $MimeTypeManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
-    $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype 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($MimeTypeManagement->plIcon), _("Mimetype 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($MimeTypeManagement->plIcon), _("Mimetype management"));
   }
index 3e8c58fd82a9f9eee7305cedfd5f0ec3e3bba0a6..7a1365bb4cab64bd60b08440eb5167f5004b0d18 100644 (file)
@@ -180,7 +180,7 @@ class sudoManagement extends plugin
           }
           unset ($this->sudotabs);
           $this->sudotabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -216,7 +216,7 @@ class sudoManagement extends plugin
       /* Register sudotabs to trigger edit dialog */
       $this->sudotabs= new sudotabs($this->config,$this->config->data['TABS']['SUDOTABS'], $this->dn);
       $this->sudotabs->set_acl_base($this->base);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -321,7 +321,7 @@ class sudoManagement extends plugin
     if (isset($_POST['edit_cancel']) && is_object($this->sudotabs)){
       $this->remove_lock();
       $this->sudotabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
index 67738f8616996d023c7e2f2aba4532b0acafc791..bfb7e2596068dcf77c40d5a5277410edd2849e68 100644 (file)
@@ -36,11 +36,11 @@ if ($remove_lock){
   $output= $sudoManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  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('plugins/sudo/images/sudo.png'), _("Sudo role administration"));
   }
index 17b1667fef80d3cf5f3da6f4b489f818289b56cc..f29de41cbfa79e170b3c0112c186aa48a05e9c6d 100644 (file)
@@ -221,7 +221,7 @@ class systems extends plugin
      ********************/
     if ($s_action=="gen_cd"){
       $this->dn= $this->terminals[$s_entry]['dn'];
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
       return ($smarty->fetch(get_template_path('gencd.tpl', TRUE)));
     }
 
@@ -565,7 +565,7 @@ class systems extends plugin
           add_lock ($this->dn, $this->ui->dn);
           $this->systab= new $tabclass($this->config, $this->config->data['TABS'][$class], $this->dn,$acl_cat);
           $this->systab->set_acl_base($this->dn);
-          session::set('objectinfo',$this->dn);
+          set_object_info($this->dn);
         }
       }else{ 
         msg_dialog::display(_("Error"), _("Editing this type of object is not supported yet!"), ERROR_DIALOG);
@@ -592,7 +592,7 @@ class systems extends plugin
       $tabacl   = $ui->get_permissions($dn,$acl,"userPassword");
       if(preg_match("/w/",$tabacl)){
         $this->dn= $this->terminals[$s_entry]['dn'];
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
         return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
       }else{
         msg_dialog::display(_("Permission error"), _("You have no permission to change this password!"), ERROR_DIALOG);
@@ -703,7 +703,7 @@ class systems extends plugin
       }else{
         msg_dialog::display(_("Error"), _("Cannot determine object to change password!"), ERROR_DIALOG);
       }
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -714,7 +714,7 @@ class systems extends plugin
     /* Delete terminal canceled? */
     if (isset($_POST['delete_cancel']) || isset($_POST['password_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -1002,7 +1002,7 @@ class systems extends plugin
 
           unset ($this->systab);
           $this->systab= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
       
           /* Reinitialize tab */
@@ -1028,7 +1028,7 @@ class systems extends plugin
         unset ($this->systab);
       }
       $this->systab= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /********************
index d5fa21e39b6bb318de48b921d89568b66198b2a3..c33f6ba3c2437556793949d09d95c2c012947db9 100644 (file)
@@ -41,8 +41,8 @@ if ($remove_lock){
        }
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($systems->plIcon), _("System 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($systems->plIcon), _("System 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($systems->plIcon), _("System management"));
        }