Code

Moved some more to global
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Dec 2008 17:27:59 +0000 (17:27 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Dec 2008 17:27:59 +0000 (17:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13265 594d385d-05f5-0310-b6e9-bd551577e9d8

15 files changed:
gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/acl/class_aclRole.inc
gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/groups/class_groupGeneric.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/generic/welcome/main.inc
gosa-core/plugins/personal/generic/class_user.inc
gosa-core/plugins/personal/generic/main.inc
gosa-core/plugins/personal/password/class_password.inc
gosa-core/plugins/personal/posix/class_posixAccount.inc
gosa-core/plugins/personal/posix/main.inc

index 430382fbf1c1e9db8e6e8440efd940bdcf8a273f..650389ca74b2eb039bd4b9e3f3ef5373e35390a2 100644 (file)
@@ -59,7 +59,7 @@ class aclManagement extends plugin
     /* Call parent execute */
     plugin::execute();
 
-    session::set('LOCK_VARS_TO_USE',array("/^item_selected/","/^menu_action/",
+    session::global_set('LOCK_VARS_TO_USE',array("/^item_selected/","/^menu_action/",
           "/^list/","/^id_/","/^menu_action/","/^act$/","/^id$/"));
 
     $smarty       = get_smarty();                 // Smarty instance
index 251822d6dcbb3b201683aad315694ba1557dbac5..8229059306094d3df7974a0364b4db228b282ba2 100644 (file)
@@ -60,7 +60,7 @@ class aclrole extends acl
     plugin::plugin($config, $dn);
 
     if($this->dn == "new"){
-      $this->base  = session::get('CurrentMainBase');
+      $this->base  = session::global_get('CurrentMainBase');
     }else{
       $this->base = preg_replace("/^[^,]+,[^,]+,/","",$this->dn);
       new log("view","acl/".get_class($this),$this->dn);
@@ -77,7 +77,7 @@ class aclrole extends acl
     ksort($this->gosaAclTemplate);
 
     /* Extract available categories from plugin info list */
-    $tmp= session::get('plist');
+    $tmp= session::global_get('plist');
     $plist= $tmp->info;
     $oc = array();
     foreach ($plist as $class => $acls){
@@ -177,7 +177,7 @@ class aclrole extends acl
       }
     }
 
-    $tmp= session::get('plist');
+    $tmp= session::global_get('plist');
     $plist= $tmp->info;
 
     /* Handle posts */
@@ -477,7 +477,7 @@ class aclrole extends acl
 
   function sort_by_priority($list)
   {
-    $tmp= session::get('plist');
+    $tmp= session::global_get('plist');
     $plist= $tmp->info;
     asort($plist);
     $newSort = array();
@@ -619,7 +619,7 @@ class aclrole extends acl
     /* Refresh users ACL */
     $ui= get_userinfo();
     $ui->loadACL();
-    session::set('ui',$ui);
+    session::global_set('ui',$ui);
   }
 
 
index 099d1967f59efbc856a1abeb351975dcf7a084cf..71686c1ac3598a714336cd4f999bd13739d65e4a 100644 (file)
@@ -97,8 +97,8 @@ class department extends plugin
                /* Set base */
                if ($this->dn == "new"){
                        $ui= get_userinfo();
-                       if(session::is_set('CurrentMainBase')){
-                               $this->base = session::get('CurrentMainBase');
+                       if(session::global_is_set('CurrentMainBase')){
+                               $this->base = global_session::get('CurrentMainBase');
                        }else{
                                $this->base= dn2base($ui->dn);
                        }
index 96d0ec35353ec07806fea73388d8cc1535434178..5edf9e57a9ba3005084264f49d9d9f669d9e9b28 100644 (file)
@@ -61,7 +61,7 @@ class departmentManagement extends plugin
       Var init 
      ***************/
 
-    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^dep_edit_.*/","/^dep_del_.*/","/^item_selected/","/^remove_multiple_departments/","/^menu_action/"));
+    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^dep_edit_.*/","/^dep_del_.*/","/^item_selected/","/^remove_multiple_departments/","/^menu_action/"));
 
     /* Reload departments */
     $smarty                                            = get_smarty();
@@ -413,7 +413,7 @@ class departmentManagement extends plugin
     $Regex        = $this->DivListDepartment->Regex;
   
     // Create Array to Test if we have a valid back button
-    $config = session::get('config');
+    $config = session::global_get('config');
     $tmp = $config->idepartments;
 
     $types = $this->get_support_departments();
index 59ad363be3412589d66b8e601421087e99ce8457..92a2865bf63fc428ae6ef7e95ee62ab2c61c670e 100644 (file)
@@ -173,20 +173,20 @@ class group extends plugin
     }
 
     /* Get global filter config */
-    if (!session::is_set("gufilter")){
+    if (!session::global_is_set("gufilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $gufilter= array( "dselect"       => $base,
           "regex"           => "*");
-      session::set("gufilter", $gufilter);
+      session::global_set("gufilter", $gufilter);
     }
-    $gufilter= session::get('gufilter');
+    $gufilter= session::global_get('gufilter');
     $gufilter['SubSearchGroup'] = false;
-    session::set('gufilter',$gufilter);
+    session::global_set('gufilter',$gufilter);
   
     if ($this->dn == "new"){
-      if(session::is_set('CurrentMainBase')){
-        $this->base = session::get('CurrentMainBase');
+      if(session::global_is_set('CurrentMainBase')){
+        $this->base = session::global_get('CurrentMainBase');
       }else{
         $ui= get_userinfo();
         $this->base= dn2base($ui->dn);
@@ -216,12 +216,12 @@ class group extends plugin
     }
 
     /* Get global filter config */
-    if (!session::is_set("sysfilter")){
+    if (!session::global_is_set("sysfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $sysfilter= array( "depselect"       => $base,
           "regex"           => "*");
-      session::set("sysfilter", $sysfilter);
+      session::global_set("sysfilter", $sysfilter);
     }
 
     /* This is always an account */
@@ -344,7 +344,7 @@ class group extends plugin
     if ($this->show_ws_dialog){
 
       /* Save data */
-      $sysfilter= session::get("sysfilter");
+      $sysfilter= session::global_get("sysfilter");
       foreach( array("depselect", "regex") as $type){
         if (isset($_POST[$type])){
           $sysfilter[$type]= $_POST[$type];
@@ -357,7 +357,7 @@ class group extends plugin
         }
         $sysfilter['regex']= $s;
       }
-      session::set("sysfilter", $sysfilter);
+      session::global_set("sysfilter", $sysfilter);
 
       /* Get workstation list */
       $exclude= "";
@@ -426,7 +426,7 @@ class group extends plugin
     if ($this->group_dialog){
 
       /* Save data */
-      $gufilter= session::get("gufilter");
+      $gufilter= session::global_get("gufilter");
       foreach( array("dselect", "regex") as $type){
         if (isset($_POST[$type])){
           $gufilter[$type]= $_POST[$type];
@@ -447,7 +447,7 @@ class group extends plugin
         }
         $gufilter['regex']= $s;
       }
-      session::set("gufilter", $gufilter);
+      session::global_set("gufilter", $gufilter);
       $this->reload();
 
       /* Show dialog */
@@ -644,7 +644,7 @@ class group extends plugin
   function reload($silent = FALSE)
   {
     /* Fix regex string */
-    $gufilter = session::get("gufilter");
+    $gufilter = session::global_get("gufilter");
     $regex    = normalizeLdap($gufilter['regex']);
     $MaxUser  = $this->OnlyShowFirstEntries;
 
index da14a33fe4be224e4d416a31c484501b220799e2..f0045b3d50afa1126731c40ecf09145cd56556d8 100644 (file)
@@ -68,7 +68,7 @@ class groupManagement extends plugin
        plugin::execute();
 
     /* Store these posts if the current object is locked (used by somebody else)*/
-    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_groups/","/^multiple_edit/","/menu_action/","/_group_/"));
+    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_groups/","/^multiple_edit/","/menu_action/","/_group_/"));
 
     /* Save data */
     $s_action   = "";
@@ -616,7 +616,7 @@ class groupManagement extends plugin
     /* Prepare ldap class */
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($base);
-    $ldap->set_size_limit(session::get('size_limit'));
+    $ldap->set_size_limit(session::global_get('size_limit'));
 
 
     /********************
index 9aeff56552c9c0c10c6fe64e51e05f8474a5b59d..b038bf6611c88396200e9dfa5ca750a9aeddb115 100644 (file)
@@ -86,14 +86,14 @@ class ogroup extends plugin
     $this->is_account= TRUE;
 
     /* Get global filter config */
-    if (!session::is_set("ogfilter")){
+    if (!session::global_is_set("ogfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $ogfilter= array( "dselect"       => $base,
           "regex"           => "*");
-      session::set("ogfilter", $ogfilter);
+      session::global_set("ogfilter", $ogfilter);
     }
-    $ogfilter= session::get('ogfilter');
+    $ogfilter= session::global_get('ogfilter');
 
     /* Adjust flags */
     foreach( array(   "U" => "accounts",
@@ -114,15 +114,15 @@ class ogroup extends plugin
         $ogfilter[$val]= "";
       }
     }
-    session::set("ogfilter", $ogfilter);
+    session::global_set("ogfilter", $ogfilter);
   
-    if(session::is_set('CurrentMainBase')){
-     $this->base  = session::get('CurrentMainBase');
+    if(session::global_is_set('CurrentMainBase')){
+     $this->base  = global_session::get('CurrentMainBase');
     }
 
     /* Set base */
     if ($this->dn == "new"){
-      $this->base = session::get('CurrentMainBase');
+      $this->base = session::global_get('CurrentMainBase');
     } else {
       $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/","",$this->dn);
 
@@ -170,12 +170,12 @@ class ogroup extends plugin
     $this->orig_base = $this->base;
 
     /* Get global filter config */
-    if (!session::is_set("sysfilter")){
+    if (!session::global_is_set("sysfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $sysfilter= array( "depselect"       => $base,
           "regex"           => "*");
-      session::set("sysfilter", $sysfilter);
+      session::global_set("sysfilter", $sysfilter);
     }
 
     /* Load member data */
@@ -309,7 +309,7 @@ class ogroup extends plugin
     /* Show ws dialog */
     if ($this->show_ws_dialog){
       /* Save data */
-      $sysfilter= session::get("sysfilter");
+      $sysfilter= session::global_get("sysfilter");
       foreach( array("depselect", "regex") as $type){
         if (isset($_POST[$type])){
           $sysfilter[$type]= $_POST[$type];
@@ -322,7 +322,7 @@ class ogroup extends plugin
         }
         $sysfilter['regex']= $s;
       }
-      session::set("sysfilter", $sysfilter);
+      session::global_set("sysfilter", $sysfilter);
 
       /* Get workstation list */
       $exclude= "";
@@ -401,7 +401,7 @@ class ogroup extends plugin
     if ($this->group_dialog){
 
       /* Save data */
-      $ogfilter= session::get("ogfilter");
+      $ogfilter= session::global_get("ogfilter");
       foreach( array("dselect", "regex") as $type){
         if (isset($_POST[$type])){
           $ogfilter[$type]= $_POST[$type];
@@ -426,7 +426,7 @@ class ogroup extends plugin
         }
         $ogfilter['regex']= $s;
       }
-      session::set("ogfilter", $ogfilter);
+      session::global_set("ogfilter", $ogfilter);
       $this->reload();
 
       /* Calculate actual groups / remove entries that are already inside... */
@@ -644,7 +644,7 @@ class ogroup extends plugin
     $filter                       = "";
     $objectClasses                = array();
     
-    $ogfilter               = session::get("ogfilter");
+    $ogfilter               = session::global_get("ogfilter");
     $regex                  = $ogfilter['regex'];
 
     $ldap= $this->config->get_ldap_link();
index 634d863c9d3fb7e2e7d8d488c62901703b37b32e..b4f98f9c67e67e26fc09ed67d30adc4327602f1d 100644 (file)
@@ -64,7 +64,7 @@ class ogroupManagement extends plugin
       Variable intialisation && Check posts for commands  
      ****************/
 
-    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_ogroups/","/^menu_action/"));
+    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_ogroups/","/^menu_action/"));
 
     $smarty     = get_smarty();
     $s_action   = "";
index 9bf6ea459397f7dd5fdd00d1b43a1de3b0257c72..98e2b87e9415b70d0a9e8be0ba5dd246ba07cb48 100644 (file)
@@ -66,7 +66,7 @@ class userManagement extends plugin
     plugin::execute();
 
     /* LOCK MESSAGE Vars */
-    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_users/","/^multiple_edit/","/menu_action/"));
+    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_users/","/^multiple_edit/","/menu_action/"));
 
     $smarty       = get_smarty();                 // Smarty instance
     $s_action     = "";                           // Contains the action to be taken
index c3652050387855f214bc5dce0092b296a8df8858..5be00b0057ebaf7ab0944b162b306c890cd9cd14 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 if (!$remove_lock){
-       session::set('plugin_dir',dirname(__FILE__));
+       session::global_set('plugin_dir',dirname(__FILE__));
        $smarty->assign("iconmenu", $plist->show_iconmenu());
        $smarty->assign("header", print_header(get_template_path('images/welcome.png'), sprintf(_("Welcome %s!"), $ui->cn)));
        $smarty->assign("year", date("Y"));
index adb14ec187f78990f27c46501a61455a6cafebcc..a11dd5c6fdc9973278102b9c5dc9422d23f37c60 100644 (file)
@@ -1071,11 +1071,11 @@ class user extends plugin
     $this->cleanup();
 
     /* Update current locale settings, if we have edited ourselves */
-    $ui = session::get('ui');
+    $ui = session::global_get('ui');
     if(isset($this->attrs['preferredLanguage']) && $this->dn == $ui->dn){
       $ui->language = $this->preferredLanguage;
-      session::set('ui',$ui);
-      session::set('Last_init_lang',"update");
+      session::global_set('ui',$ui);
+      session::global_set('Last_init_lang',"update");
     }
 
     $ldap->cd ($this->dn);
index 63c770065806401900167470aaeeb36db9b3bab1..b0687b880cdc6f2043d16d5fba21d97ee6465b5f 100644 (file)
@@ -57,15 +57,15 @@ if (!$remove_lock){
 
     /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
-      session::set('back_plugin',$plug);
-      session::set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
+      session::global_set('back_plugin',$plug);
+      session::global_set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
       $lock_msg =  gen_locked_message ($username, $ui->dn);
   
     }else{
 
       /* Lock the current entry */
       add_lock ($ui->dn, $ui->dn);
-      session::set('dn',$ui->dn);
+      session::global_set('dn',$ui->dn);
       session::set('edit',TRUE);
     }
   }
index db087e57cb2aa821eb615c1f7f0f945d193ebb50..a706ea861f7913d24d525c527f6ed5101a76e711 100644 (file)
@@ -116,7 +116,7 @@ class password extends plugin
             change_password ($ui->dn, $_POST['new_password']);
             gosa_log ("User/password has been changed");
             $ui->password= $_POST['new_password'];
-            session::set('ui',$ui);
+            session::global_set('ui',$ui);
 #$this->handle_post_events("modify",array("userPassword" => $_POST['new_password']));
             return($smarty->fetch(get_template_path("changed.tpl", TRUE)));
           }
index 213850ee1c9ea6bae0a9719667d8575e45cc0690..333af961ffe160634554ec72de727624d69bed69 100644 (file)
@@ -225,12 +225,12 @@ class posixAccount extends plugin
     asort ($this->secondaryGroups);
 
     /* Get global filter config */
-    if (!session::is_set("sysfilter")){
+    if (!session::global_is_set("sysfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $sysfilter= array( "depselect"       => $base,
           "regex"           => "*");
-      session::set("sysfilter", $sysfilter);
+      session::global_set("sysfilter", $sysfilter);
     }
     $this->ui = get_userinfo();
   }
@@ -251,7 +251,7 @@ class posixAccount extends plugin
 
     /* Department has changed? */
     if(isset($_POST['depselect'])){
-      session::set('CurrentMainBase',validate($_POST['depselect']));
+      session::global_set('CurrentMainBase',validate($_POST['depselect']));
     }
 
     if($this->multiple_support_active){
@@ -364,7 +364,7 @@ class posixAccount extends plugin
     /* Show ws dialog */
     if ($this->show_ws_dialog){
       /* Save data */
-      $sysfilter= session::get("sysfilter");
+      $sysfilter= session::global_get("sysfilter");
       foreach( array("depselect", "regex") as $type){
         if (isset($_POST[$type])){
           $sysfilter[$type]= $_POST[$type];
@@ -377,7 +377,7 @@ class posixAccount extends plugin
         }
         $sysfilter['regex']= $s;
       }
-      session::set("sysfilter", $sysfilter);
+      session::global_set("sysfilter", $sysfilter);
 
       /* Get workstation list */
       $exclude= "";
@@ -449,7 +449,7 @@ class posixAccount extends plugin
       $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png'));
       $smarty->assign("deplist", $this->config->idepartments);
       $smarty->assign("alphabet", generate_alphabet());
-      $smarty->assign("depselect", session::get('CurrentMainBase'));
+      $smarty->assign("depselect", session::global_get('CurrentMainBase'));
       $smarty->assign("hint", print_sizelimit_warning());
 
       $smarty->assign("apply", apply_filter());
@@ -461,7 +461,7 @@ class posixAccount extends plugin
     $smarty= get_smarty();
 
     /* In 'MyAccount' mode, we must remove write acls if we are not in editing mode. */ 
-    $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit');
+    $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::global_is_set('edit');
 
     /* Depending on pwmode, currently hardcoded because there are no other methods */
     if ( 1 == 1 ){
@@ -548,11 +548,11 @@ class posixAccount extends plugin
     /* Checkboxes */
     if ($this->force_ids == 1){
       $smarty->assign("force_ids", "checked");
-      if (session::get('js')){
+      if (session::global_get('js')){
         $smarty->assign("forceMode", "");
       }
     } else {
-      if (session::get('js')){
+      if (session::global_get('js')){
         $smarty->assign("forceMode", "disabled");
       }
       $smarty->assign("force_ids", "");
@@ -587,7 +587,7 @@ class posixAccount extends plugin
         $smarty->assign("use_".$val,FALSE);
       }
 
-      if((session::get("js"))&&(($val=="uidNumber")||($val=="gidNumber")))
+      if((session::global_get("js"))&&(($val=="uidNumber")||($val=="gidNumber")))
       {
         $smarty->assign("$val"."ACL",$this->getacl($val,$SkipWrite));
         $smarty->assign("$val", $this->$val);
@@ -1340,7 +1340,7 @@ class posixAccount extends plugin
   function reload()
   {
     /* Set base for all searches */
-    $base      = session::get('CurrentMainBase');
+    $base      = session::global_get('CurrentMainBase');
     $base     = $base;
     $ldap     = $this->config->get_ldap_link();    
     $attrs    =  array("cn", "description", "gidNumber");
@@ -1420,11 +1420,11 @@ class posixAccount extends plugin
     if(!$this->is_account) return("");
     if ($this->force_ids == 1){
       $force_ids = "checked";
-      if (session::get('js')){
+      if (session::global_get('js')){
         $forceMode = "";
       }
     } else {
-      if (session::get('js')){
+      if (session::global_get('js')){
         if($this->acl != "#none#")
           $forceMode ="disabled";
       }
index ffbd769fbc80e8965b99df9705a761c518e43d35..af4e0cabcd9784ba48b211e53d99ac7a81bd9698 100644 (file)
@@ -58,7 +58,7 @@ if (!$remove_lock){
     /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
       session::set('back_plugin',$plug);
-      session::set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
+      session::global_set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
       $lock_msg =  gen_locked_message ($username, $ui->dn);
 
     }else{