Code

Some additional session changes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jan 2008 08:09:36 +0000 (08:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jan 2008 08:09:36 +0000 (08:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8206 594d385d-05f5-0310-b6e9-bd551577e9d8

34 files changed:
gosa-core/include/class_MultiSelectWindow.inc
gosa-core/include/class_config.inc
gosa-core/include/class_divlist.inc
gosa-core/include/class_msg_dialog.inc
gosa-core/include/class_userinfo.inc
gosa-core/include/functions.inc
gosa-core/include/functions_FAI.inc
gosa-core/include/functions_helpviewer.inc
gosa-core/include/smarty/plugins/block.render.php
gosa-core/plugins/addons/logview/class_gosa_logview.inc
gosa-core/plugins/addons/logview/main.inc
gosa-core/plugins/admin/applications/class_applicationGeneric.inc
gosa-core/plugins/admin/applications/tabs_application.inc
gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc
gosa-core/plugins/admin/mimetypes/tabs_mimetypes.inc
gosa-core/plugins/admin/systems/class_printGeneric.inc
gosa-core/plugins/admin/systems/class_systemManagement.inc
gosa-core/plugins/admin/systems/class_workstationService.inc
gosa-core/plugins/admin/systems/class_workstationStartup.inc
gosa-core/plugins/admin/systems/ppd/class_printerPPDDialog.inc
gosa-core/plugins/admin/systems/services/glpi/class_glpiSelectUser.inc
gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc
gosa-core/plugins/gofax/faxaccount/main.inc
gosa-core/plugins/gofon/phoneaccount/class_phoneAccount.inc
gosa-core/plugins/gofon/phoneaccount/main.inc
gosa-core/plugins/personal/connectivity/main.inc
gosa-core/plugins/personal/environment/main.inc
gosa-core/plugins/personal/generic/main.inc
gosa-core/plugins/personal/mail/main.inc
gosa-core/plugins/personal/nagios/main.inc
gosa-core/plugins/personal/netatalk/main.inc
gosa-core/plugins/personal/posix/main.inc
gosa-core/plugins/personal/samba/main.inc
gosa-core/plugins/personal/scalix/main.inc

index bbdc5920d1b06f3c9c0f6603c4cd814092cd5a6a..e32eb158cb00390dd1ff911032af806a121030cf 100644 (file)
@@ -62,8 +62,9 @@ class MultiSelectWindow{
 
                /* Check if the given input field name was already used 
                   for this type of dialog */   
-               if(isset($_SESSION['MultiDialogFilters'][$this->filterName][$name])){
-                       $arr['value']   = $_SESSION['MultiDialogFilters'][$this->filterName][$name];
+    $MultiDialogFilters = session::get('MultiDialogFilters');
+               if(isset($MultiDialogFilters[$this->filterName][$name])){
+                       $arr['value']   = $MultiDialogFilters[$this->filterName][$name];
                        $this->$name = $arr['value'];
                }else{
                        $arr['value']   = $value;       
@@ -116,9 +117,10 @@ class MultiSelectWindow{
                $this->selectedBase = $_SESSION['CurrentMainBase'];
 
     /* Check default values for SaveAdditionalVars */
+    $MultiDialogFilters = session::get('MultiDialogFilters');
     foreach($this->SaveAdditionalVars as $name){
-      if(isset($_SESSION['MultiDialogFilters'][$this->filterName][$name])){
-        $this->$name = $_SESSION['MultiDialogFilters'][$this->filterName][$name];
+      if(isset($MultiDialogFilters[$this->filterName][$name])){
+        $this->$name = $MultiDialogFilters[$this->filterName][$name];
       }
     }
     
@@ -254,8 +256,9 @@ class MultiSelectWindow{
                }else{
                        /* Check if there was already a variable 
                           for this dialog which we should use instead of the default*/
-                       if(isset($_SESSION['MultiDialogFilters'][$this->filterName][$name])){
-                               $arr['default'] = $_SESSION['MultiDialogFilters'][$this->filterName][$name];
+      $MultiDialogFilters = session::get('MultiDialogFilters');
+                       if(isset($MultiDialogFilters[$this->filterName][$name])){
+                               $arr['default'] = $MultiDialogFilters[$this->filterName][$name];
                                $this->$name = $arr['default'];
                        }else{
                                $arr['default'] = $default; 
index 0b4b92eb6aa63fb964f2ec1ec65261c75a61c775..8cb002d9e1a42462dcc7841e463d8e0437c4ebc9 100644 (file)
@@ -225,7 +225,7 @@ class config  {
       display_error_page();
     }
 
-    if (!isset($_SESSION['size_limit'])){
+    if (!session::is_set('size_limit')){
       session::set('size_limit',$this->current['SIZELIMIT']);
       session::set('size_ignore',$this->current['SIZEIGNORE']);
     }
index 9c52b768c9044d714fc81ea9eef9820b53d6f744..0ed9f25200afa28bed8467350f5112db5b31f1e5 100644 (file)
@@ -204,8 +204,8 @@ class divlist {
                        $_SESSION['start'.$this->pageid]=$_GET['start'];
                        $start = $_GET['start'];
                } else {
-                       if(isset($_SESSION['start'.$this->pageid])){
-                               $start = $_SESSION['start'.$this->pageid];
+                       if(session::is_set('start'.$this->pageid)){
+                               $start = session::get('start'.$this->pageid);
                        } else {
                                $start=0;
                        }
index efd6cab053985c3ea318b375c70b4503de98a00f..8c3851808731614a261902ac7e8cfbc7eb0c68f0 100644 (file)
@@ -27,12 +27,13 @@ class msg_dialog
                        session::set('errorsAlreadyPosted',array());
                }
 
-               if(!isset($_SESSION['errorsAlreadyPosted'][$s_title.$s_message])){
-                       $_SESSION['errorsAlreadyPosted'][$s_title.$s_message] = 0;
+               $errorsAlreadyPosted = session::get('errorsAlreadyPosted');
+               if(!isset($errorsAlreadyPosted[$s_title.$s_message])){
+                       $errorsAlreadyPosted[$s_title.$s_message] = 0;
                }
-               $_SESSION['errorsAlreadyPosted'][$s_title.$s_message]++;
+               $errorsAlreadyPosted[$s_title.$s_message]++;
 
-               if($_SESSION['errorsAlreadyPosted'][$s_title.$s_message] <=1  ){
+               if($errorsAlreadyPosted[$s_title.$s_message] <=1  ){
 
                        $this->i_ID      = preg_replace("/[^0-9]*/","",microtime()); 
                        $this->s_Title   = $s_title;
@@ -46,7 +47,7 @@ class msg_dialog
                                preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS'])){
                                $this->a_Trace   = debug_backtrace();
                        }
-                       if(!isset($_SESSION['msg_dialogs'])){
+                       if(!session::is_set('msg_dialogs')){
                                session::set('msg_dialogs',array());
                        }
                        if($this->i_Type == FATAL_ERROR_DIALOG){
@@ -57,6 +58,7 @@ class msg_dialog
                                $_SESSION['msg_dialogs'][] = $this;
                        }
                }
+               session::set('errorsAlreadyPosted',$errorsAlreadyPosted);
        }
 
        public static function display($s_title,$s_message,$i_type = INFO_DIALOG)
@@ -125,7 +127,7 @@ class msg_dialog
 #                      $seen = $_POST['closed_msg_dialogs'];
                }
 
-               if(isset($_SESSION['msg_dialogs']) && is_array($_SESSION['msg_dialogs']) && count($_SESSION['msg_dialogs'])){
+               if(session::is_set('msg_dialogs') && is_array($_SESSION['msg_dialogs']) && count($_SESSION['msg_dialogs'])){
 
                        /* Get frame one */
                        $smarty = get_smarty();
index 77015dad2290a8992a921968fd50cb3281efdf62..50ea8b169a3d524816c8340bacaa73f4a4784541 100644 (file)
@@ -190,13 +190,14 @@ class userinfo
   function get_permissions($dn, $object, $attribute= "", $skip_write= FALSE)
   {
     /* Push cache answer? */
-    if (isset($_SESSION['ACL_CACHE']["$dn+$object+$attribute"])){
+    $ACL_CACHE = session::get('ACL_CACHE');
+    if (isset($ACL_CACHE["$dn+$object+$attribute"])){
 
       /* Remove write if needed */
       if ($skip_write){
-        $ret = preg_replace('/w/', '', $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]);
+        $ret = preg_replace('/w/', '', $ACL_CACHE["$dn+$object+$attribute"]);
       }else{
-        $ret = $_SESSION['ACL_CACHE']["$dn+$object+$attribute"];
+        $ret = $ACL_CACHE["$dn+$object+$attribute"];
       } 
       return($ret);
     }
@@ -288,8 +289,9 @@ class userinfo
   function get_module_departments($module)
   {
     /* Use cached results if possilbe */
-    if(isset($_SESSION['ACL_CACHE']['MODULE_DEPARTMENTS'][serialize($module)])){
-      return($_SESSION['ACL_CACHE']['MODULE_DEPARTMENTS'][serialize($module)]);
+    $ACL_CACHE = session::get('ACL_CACHE');
+    if(isset($ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)])){
+      return($ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)]);
     }
 
     global $plist;
index 6937598f281545d9f3c4c80542e673b7c0017579..1b90b74878b16d9c177a629149a73fb3858df299 100644 (file)
@@ -1539,19 +1539,19 @@ function print_header($image, $headline, $info= "")
 
 function register_global($name, $object)
 {
-  $_SESSION[$name]= $object;
+  session::set($name,$object);
 }
 
 
 function is_global($name)
 {
-  return isset($_SESSION[$name]);
+  return(session::is_set($name));
 }
 
 
-function &get_global($name)
+function get_global($name)
 {
-  return $_SESSION[$name];
+  return(session::get($name));
 }
 
 
index 92a350e4dab9ca386ff4aa265565073dfd72c73c..e4e7314ff440b78b0bb53dc696112c57144c6ba8 100644 (file)
@@ -214,16 +214,18 @@ function save_release_changes_now()
   $to_save = array();
 
   /* check which objects must be saved */
-  foreach($_SESSION['FAI_objects_to_save'] as $Current_DN => $object){
+  $FAI_objects_to_save = session::get('FAI_objects_to_save');
+  foreach($FAI_objects_to_save as $Current_DN => $object){
     if($object['diff']){
       $sub_name = $Current_DN;
-      while(isset($_SESSION['FAI_objects_to_save'][$sub_name])){
-        $to_save[strlen($sub_name)][$sub_name] = $_SESSION['FAI_objects_to_save'][$sub_name]; 
-        unset($_SESSION['FAI_objects_to_save'][$sub_name]);
+      while(isset($FAI_objects_to_save[$sub_name])){
+        $to_save[strlen($sub_name)][$sub_name] = $FAI_objects_to_save[$sub_name]; 
+        unset($FAI_objects_to_save[$sub_name]);
         $sub_name = preg_replace('/^[^,]+,/', '', $sub_name);
       }
     }
   }
+  session::set('FAI_objects_to_save',$FAI_objects_to_save);
 
   /* Sort list of objects that must be saved, and ensure that 
       container   objects are safed, before their childs are saved */
index 1339332ac34e5591be194bd173abd7789edcb111..ce7a7f45b485edf093939e5a2d4687ac4665b8f0 100644 (file)
@@ -271,7 +271,7 @@ function search($arr,$word)
   $tryword                    = "";     // Temporary searchword handling
   $result['global']['maxhit'] = 0;
   session::un_set('lastresults');
-  unset($_SESSION['parsed_search_keyword']);
+  session::un_set('parsed_search_keyword');
   session::set('parsed_search_keyword',"");
 
   error_reporting(E_ALL | E_STRICT);
index e58e9ad1ab380b2699c34dabffa8f7c76a46da32..7b06754c3fc9497ee84c240c21c2334af8e8d302 100755 (executable)
@@ -14,7 +14,7 @@ function smarty_block_render($params, $text, &$smarty)
        }
 
        /* Debug output */
-       if (isset($_SESSION['DEBUGLEVEL']) && $_SESSION['DEBUGLEVEL'] & DEBUG_ACL ){
+       if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL ){
                echo "<font color='blue' size='2'>&nbsp;".$acl."</font>";
        }
 
index 87d234a4d7e477e91f924ccb4fd4ec191ac1353b..05be42da355df0f2e0b235ba78286f14bde7fb52 100644 (file)
@@ -35,9 +35,10 @@ class gosa_logview extends plugin
     $this->ui = get_userinfo();
 
     /* Restore last filter settings */
+    $logview = session::get('logview');
     foreach(array("action","server","time","regex") as $attr){
-      if(isset($_SESSION['logview']['gosa_log'][$attr])){
-        $this->$attr = $_SESSION['logview']['gosa_log'][$attr];
+      if(isset($logview['gosa_log'][$attr])){
+        $this->$attr = $logview['gosa_log'][$attr];
       }
     }
 
index f6767de944d7ea63daeb92276cf11975f8923e50..218d7ad0a025efcd3b5dec4365f2143a8a1bab68 100644 (file)
@@ -20,7 +20,7 @@
 if (!$remove_lock){
 
        /* Create logview object on demand */
-       if (!isset($_SESSION['log_tabs']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
+       if (!session::is_set('log_tabs') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
                $_SESSION['log_tabs']= new log_tabs($config, $config->data['TABS']['LOGTABS'],"");
        }
        $log_tabs= $_SESSION['log_tabs'];
index 95e5145a1896ec398cd12d407deb4f6a9c902ef4..6427dbd8d3f2e4a6cfa7db6cdf0932fcf95a9c7c 100644 (file)
@@ -411,9 +411,10 @@ class application extends plugin
     $ldap->cd($this->config->current["BASE"]);
 
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
-    if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){
-      $baseDn = str_replace($this->config->current['BASE'],$this->base,$_SESSION['appfilter']['release']);
-      $baseDn = preg_replace("/".get_ou('applicationou').".*/",get_ou('applicationou').$this->base,$_SESSION['appfilter']['release']);
+    $appfilter = session::get('appfilter');
+    if((!empty($tmp)) && (isset($appfilter['release']))){
+      $baseDn = str_replace($this->config->current['BASE'],$this->base,$appfilter['release']);
+      $baseDn = preg_replace("/".get_ou('applicationou').".*/",get_ou('applicationou').$this->base,$appfilter['release']);
       $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$baseDn,array("cn"));
       if($ldap->count()){
         $attrs = $ldap->fetch();
index 1683c5ef073e2aa49dd65277342343a67fc896d3..23d2f39ad0163ae29ffa9c89600d3a79d222aa0a 100644 (file)
@@ -27,11 +27,12 @@ class apptabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
-    if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){
+    $appfilter = session::get('appfilter');
+    if((!empty($tmp)) && (isset($appfilter['release']))){
       if(!$baseobject->isReleaseApplikation){
         $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
       }else{
-        $new_dn ="cn=".$baseobject->cn.",".$_SESSION['appfilter']['release'];
+        $new_dn ="cn=".$baseobject->cn.",".$appfilter['release'];
       }
     }else{
       $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
index 05f868070559f637cc359cff15be8f43fec96315..67d383873ce7bb7f0443b532fb4a3cb382b617dc 100644 (file)
@@ -133,7 +133,7 @@ class mimetype extends plugin
     /* Set base */     
     if ($this->dn == "new"){
       if(session::is_set('CurrentMainBase')){
-        $this->base= $_SESSION['CurrentMainBase'];
+        $this->base= session::get('CurrentMainBase');
       }else{
         $ui= get_userinfo();
         $this->base= dn2base($ui->dn);
@@ -537,7 +537,10 @@ class mimetype extends plugin
     /* Check if there is already a mime type with this cn */
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current["BASE"]);
-    if($this->isReleaseMimeType && (isset($_SESSION['mimefilter']['release']))){
+
+    $mimefilter = session::get('mimefilter');
+  
+    if($this->isReleaseMimeType && (isset($mimefilter['release']))){
       $baseDn = str_replace($this->config->current['BASE'],$this->base,$_SESSION['mimefilter']['release']);
       $baseDn = preg_replace("/".get_ou('mimetypeou').".*/",get_ou('mimetypeou').$this->base,$_SESSION['mimefilter']['release']);
       $ldap->ls("(&(objectClass=gotoMimeType)(cn=".$this->cn."))",$baseDn,array("cn"));
index e8f53d32ec3e05730b095044bf64a1bedf113f5a..9e93bb411465796da612ca7a8bcc9cdb5c58540f 100755 (executable)
@@ -28,11 +28,13 @@ class mimetabs extends tabs
        'dn' to all plugins */
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
 
-    if((!empty($tmp)) && (isset($_SESSION['mimefilter']['release']))){
+    $mimefilter = session::get('mimefilter');
+
+    if((!empty($tmp)) && (isset($mimefilter['release']))){
       if(!$baseobject->isReleaseMimeType){
         $new_dn= "cn=".$baseobject->cn.",".get_ou('mimetypeou').$baseobject->base;
       }else{
-        $new_dn ="cn=".$baseobject->cn.",".$_SESSION['mimefilter']['release'];
+        $new_dn ="cn=".$baseobject->cn.",".$mimefilter['release'];
       }
     }else{
       $new_dn= "cn=".$baseobject->cn.",".get_ou('mimetypeou').$baseobject->base;
index effcfc029bb928f1fe41a370151fbdd5f4882ac5..6761f2f880715ac0f17e00d0c4f1c020d91de03f 100644 (file)
@@ -502,7 +502,8 @@ class printgeneric extends plugin
     }
 
     /* Parse selected ppd file */
-    if((isset($_SESSION['config']->data['MAIN']['PPD_PATH']))&&(is_dir($_SESSION['config']->data['MAIN']['PPD_PATH']))){
+    $config = session::get('config');
+    if((isset($config->data['MAIN']['PPD_PATH']))&&(is_dir($config->data['MAIN']['PPD_PATH']))){
 
       $path = $_SESSION['config']->data['MAIN']['PPD_PATH'];
       if(!preg_match("/\/$/",$path)){
index 8b2bcc94b183a0d63a1e814d0013b578868998ac..bcbd9b5f17239f56988ff6d9d7ff723bc778649a 100644 (file)
@@ -766,7 +766,8 @@ class systems extends plugin
         }
 
         /* Save terminal data to ldap */
-        if(isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){
+        $SelectedSystemType = session::get('SelectedSystemType');
+        if(isset($SelectedSystemType['ogroup']) && $SelectedSystemType['ogroup'] != 'none'){
           foreach (array("workservice", "termservice") as $cls){
             if (isset($this->systab->by_object[$cls])){
               $this->systab->by_object[$cls]->gotoXMouseport= "";
@@ -780,7 +781,7 @@ class systems extends plugin
         $this->systab->save();
 
         if(session::is_set('SelectedSystemType')){
-          unset($_SESSION['SelectedSystemType']);
+          session::un_set('SelectedSystemType');
           if(!isset($ldap)){
             $ldap = $this->config->get_ldap_link();
           }
@@ -824,7 +825,7 @@ class systems extends plugin
 
       /* Remove ogroup selection, which was set while editing a new incoming entry */
       if(session::is_set('SelectedSystemType')){
-        unset($_SESSION['SelectedSystemType']);
+        session::un_set('SelectedSystemType');
       }
     }
 
index 23698cf61a870110bb751d866d9595e1f26b1f1c..526b9cc17f936ed10c646e060022f64e44622f73 100644 (file)
@@ -222,7 +222,8 @@ class workservice extends plugin
     }
 
     /* Workaround to fill in inherited values if we've specified an objectclass */
-    if (isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){
+    $SelectedSystemType = $SelectedSystemType;
+    if (isset($SelectedSystemType['ogroup']) && $SelectedSystemType['ogroup'] != 'none'){
       $this->XResolutions= array('default' => _("inherited"));
       $this->XColordepths= array('default' => _("inherited"));
       $this->XKbModels= array('default' => _("inherited"));
index 37196680193613c456c11b17cf0aac89890b50aa..457acc4f4920a091f38f8eac992c694e53bb5e65 100644 (file)
@@ -426,8 +426,9 @@ class workstartup extends plugin
     /* There could be more than one server providing this release,
         so use cached result if available
      */
-    if(isset($_SESSION['getAvailableClassesForThisRelease_CACHE'][$release]))  {
-      return($_SESSION['getAvailableClassesForThisRelease_CACHE'][$release]);
+    $getAvailableClassesForThisRelease_CACHE = session::get('getAvailableClassesForThisRelease_CACHE');
+    if(isset($getAvailableClassesForThisRelease_CACHE[$release]))  {
+      return($getAvailableClassesForThisRelease_CACHE[$release]);
     }
 
     $test2  = array();
@@ -436,7 +437,7 @@ class workstartup extends plugin
     $ldap   = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
   
-    /* Get classes fpr given release */
+    /* Get classes for given release */
     $p_classes = get_all_objects_for_given_base($bb,
         "(|(objectClass=FAIpackageList)(objectClass=FAItemplate)".
           "(objectClass=FAIvariable)(objectClass=FAIscript)(objectClass=FAIhook)".
index a93e91bb4e56ad2a40d99cafcc41e6827d0e57c3..49f6681808217313e5cf558ef96d58ddd878c1a0 100644 (file)
@@ -39,8 +39,9 @@ class printerPPDDialog extends plugin
     $this->depselect = $this->config->current['BASE'];
 
     /* Get PPD path and remove double //, and add trailing /  */
-    if(isset($_SESSION['config']->data['MAIN']['PPD_PATH'])){
-      $this->pathToPPD = $_SESSION['config']->data['MAIN']['PPD_PATH'];
+    $config = session::get('config');
+    if(isset($config->data['MAIN']['PPD_PATH'])){
+      $this->pathToPPD = $config->data['MAIN']['PPD_PATH'];
       $this->pathToPPD= preg_replace("/\/\//", "/", $this->pathToPPD);
       if(!preg_match("/\/$/",$this->pathToPPD)){
         $this->pathToPPD = $this->pathToPPD."/";
index 7b580df3161dfd3823d7f8436297a386718036da..1356557e4cbb9e80b8fbaaa398e02df567d47c7e 100644 (file)
@@ -25,7 +25,7 @@ class glpiSelectUser extends plugin
 
     $this->PostVarName = $postvar;
 
-    if(!isset($_SESSION['glpi_user_filter'])){
+    if(!session::is_set('glpi_user_filter')){
       $tmp['users_regex'] = "*";
       $tmp['base']       = $this->config->current['BASE'];
       session::set('glpi_user_filter',$tmp);
index 087ae83c8a36ad924f4803d9b27dd4bd2a657820..356781eae28a7e95e958c52cf66d3e6f6b638b9b 100644 (file)
@@ -66,7 +66,7 @@ class gofaxAccount extends plugin
     /* Hickert : 11.11.05
      * Added to be able to handle department selection in divSelelect
      */
-    if(!isset($_SESSION["Fax_Filter"])){
+    if(!session::is_set("Fax_Filter")){
       $_SESSION['Fax_Filter']['depselect'] = $this->config->current['BASE'];
     }
 
index 26cdd6e1be0a0f7855ec1783b85c7b605a378af7..9c3389f4a13b3791064058fdc8e575349833c095 100644 (file)
@@ -24,7 +24,7 @@ if (!$remove_lock){
        $gofaxAccount= $_SESSION['gofaxAccount'];
 
        /* save changes back to object */
-       if (isset ($_SESSION['edit'])){
+       if (session::is_set('edit')){
                $gofaxAccount->save_object ();
        }
 
@@ -74,7 +74,7 @@ if (!$remove_lock){
        $info= "";
 
        /* Store changes  in session */
-       if (isset ($_SESSION['edit'])){
+       if (session::is_set('edit')){
                session::set('gofaxAccount',$gofaxAccount);
        }
 
index 97bf0f27dc475b77030f48f210fa6e6e8c87fee0..84c0e037eecb9f88846523d589ae121c921cc916 100644 (file)
@@ -84,15 +84,14 @@ class phoneAccount extends plugin
 
   
     /* Set available server */
-    if(isset($_SESSION['config']->data['SERVERS']['FON'])){
-      $this->goFonHomeServers = $_SESSION['config']->data['SERVERS']['FON'];
+    $config = session::get('config');
+    if(isset($config->data['SERVERS']['FON'])){
+      $this->goFonHomeServers = $config->data['SERVERS']['FON'];
     }
 
     $a_SETUP= array();
-    if($this->is_account &&
-       array_key_exists('config',$_SESSION) &&
-       array_key_exists('SERVERS',$_SESSION['config']->data) &&
-       array_key_exists('FON',$_SESSION['config']->data['SERVERS']) &&
+    if($this->is_account && isset($config->data['SERVERS']['FON']) &&
+       array_key_exists('FON',$config->data['SERVERS']) &&
        is_callable("mysql_connect")
        ) {
 
index fd5f7d99407313c5b778fa870dba6102bda94c9e..90c44943a0e587493ca6cc03f3213a345c792c23 100644 (file)
@@ -39,7 +39,7 @@ if (!$remove_lock){
        $phoneAccount= $_SESSION['phoneAccount'];
 
        /* save changes back to object */
-       if (isset ($_SESSION['edit'])){
+       if (session::is_set('edit')){
                $phoneAccount->save_object ();
        }
 
@@ -91,7 +91,7 @@ if (!$remove_lock){
        }
 
        /* Store changes  in session */
-       if (isset ($_SESSION['edit'])){
+       if (session::is_set('edit')){
                session::set('phoneAccount',$phoneAccount);
        }
 
index 16b66c13e979a71a694dd215d71278534e6ad372..8f72a142a58d7fec9df88779b892282d6a4412a7 100644 (file)
@@ -45,7 +45,7 @@ if (!$remove_lock){
   $connectivity= $_SESSION['connectivity'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $connectivity->save_object ();
   }
 
@@ -90,7 +90,7 @@ if (!$remove_lock){
   $display= $connectivity->execute ();
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('connectivity',$connectivity);
   }
 
index 7142f96e7b894a8ff5ae76b791df75a8b9d7fbed..cb2fb6b4dcf1bb8139c8b8122a8bc56da3ad0470 100644 (file)
@@ -87,7 +87,7 @@ if (!$remove_lock){
   }
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('environment',$environment);
   }
 
index 556cfe8ec10b227e2f315bcffad32c21cb97ecea..8d72c9fd1e157aac336c7d8a5ca723c6bfbeea23 100644 (file)
@@ -41,12 +41,12 @@ if (!$remove_lock){
   $user= $_SESSION['user'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $user->save_object ();
   }
 
   /* Enter edit mode? */
-  if ((isset($_POST['edit'])) && (!isset( $_SESSION['edit'])) &&preg_match("/w/",$ui->get_permissions($ui->dn,"users/user"))){
+  if ((isset($_POST['edit'])) && (!session::is_set('edit')) &&preg_match("/w/",$ui->get_permissions($ui->dn,"users/user"))){
 
     /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
@@ -143,7 +143,7 @@ if (!$remove_lock){
   }
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('user',$user);
   }
 
index 8c63ae1818be600dc9da6deaa4f9818acc85b079..e92e3b0ce23b063d69e52d85d0d0fa6eb2f7a64c 100644 (file)
@@ -39,7 +39,7 @@ if (!$remove_lock){
   $mailAccount= $_SESSION['mailAccount'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $mailAccount->save_object ();
   }
 
@@ -89,7 +89,7 @@ if (!$remove_lock){
   }
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('mailAccount',$mailAccount);
   }
 
index 3bc2369159ed251a1741da78cb861d3ad85fd338..3d30664cb70f2eaa97b7f435a35bb14085953c25 100644 (file)
@@ -40,7 +40,7 @@ if (!$remove_lock){
   $nagiosAccount= $_SESSION['nagiosAccount'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $nagiosAccount->save_object ();
   }
 
@@ -90,7 +90,7 @@ if (!$remove_lock){
   }
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('nagiosAccount',$nagiosAccount);
   }
 
index bb03aa91871914daf89ad8b48409c3e6a3732681..2fca342da07d70cdab94639589e5fc997b114ca7 100644 (file)
@@ -28,7 +28,7 @@ if (!$remove_lock) {
   }
 
   /* Create netatalk object on demand */
-  if (!isset ($_SESSION['netatalk']) || (isset ($_GET['reset']) && $_GET['reset'] == 1)) {
+  if (!session::is_set('netatalk') || (isset ($_GET['reset']) && $_GET['reset'] == 1)) {
     $_SESSION['netatalk'] = new netatalk($config, $ui->dn);
     $_SESSION['netatalk']->enable_CSN_check();
     $_SESSION['netatalk']->set_acl_base($ui->dn);
@@ -37,7 +37,7 @@ if (!$remove_lock) {
   $netatalk = $_SESSION['netatalk'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])) {
+  if (session::is_set('edit')) {
     $netatalk->save_object();
   }
 
@@ -81,7 +81,7 @@ if (!$remove_lock) {
   $display = $netatalk->execute();
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])) {
+  if (session::is_set('edit')) {
     session::set('netatalk',$netatalk);
   }
 
@@ -91,7 +91,7 @@ if (!$remove_lock) {
     $display .= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset ($_SESSION['edit'])) {
+    if (session::is_set('edit')) {
       $display .= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display .= "&nbsp;";
       $display .= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 44c8c401fc48e1fc4193889fe1930f958c873f56..571e88ba006ac2b407660365d84f3f2ac2956e32 100644 (file)
@@ -40,7 +40,7 @@ if (!$remove_lock){
   $posixAccount= $_SESSION['posixAccount'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $posixAccount->save_object ();
   }
 
@@ -91,7 +91,7 @@ if (!$remove_lock){
   }
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('posixAccount',$posixAccount);
   }
 
index be3354ce3fb31957c786414007bc95fc3a008c9e..83e44cf208743ad8df2b7100bf9d64b64b3ef602 100644 (file)
@@ -40,7 +40,7 @@ if (!$remove_lock){
   $sambaAccount= $_SESSION['sambaAccount'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $sambaAccount->save_object ();
   }
 
@@ -90,7 +90,7 @@ if (!$remove_lock){
   }
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('sambaAccount',$sambaAccount);
   }
 
index abfd65a45ed9b9c14ec5c3adecc8b7fc3f080a8b..3b913efe3722ae48c3535a55c4ef46e09e76d69e 100644 (file)
@@ -38,7 +38,7 @@ if (!$remove_lock){
   $scalixAccount= $_SESSION['scalixAccount'];
 
   /* save changes back to object */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $scalixAccount->save_object ();
   }
 
@@ -86,7 +86,7 @@ if (!$remove_lock){
   $display= $scalixAccount->execute ();
 
   /* Store changes  in session */
-  if (isset ($_SESSION['edit'])){
+  if (session::is_set('edit')){
     session::set('scalixAccount',$scalixAccount);
   }