From a221e82a2c7a447ff5222c517494a1a7e5d28a9f Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 11 Dec 2008 17:27:59 +0000 Subject: [PATCH] Moved some more to global git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13265 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/admin/acl/class_aclManagement.inc | 2 +- gosa-core/plugins/admin/acl/class_aclRole.inc | 10 +++---- .../departments/class_departmentGeneric.inc | 4 +-- .../class_departmentManagement.inc | 4 +-- .../admin/groups/class_groupGeneric.inc | 26 ++++++++--------- .../admin/groups/class_groupManagement.inc | 4 +-- .../plugins/admin/ogroups/class_ogroup.inc | 28 +++++++++---------- .../admin/ogroups/class_ogroupManagement.inc | 2 +- .../admin/users/class_userManagement.inc | 2 +- gosa-core/plugins/generic/welcome/main.inc | 2 +- .../plugins/personal/generic/class_user.inc | 6 ++-- gosa-core/plugins/personal/generic/main.inc | 6 ++-- .../personal/password/class_password.inc | 2 +- .../personal/posix/class_posixAccount.inc | 26 ++++++++--------- gosa-core/plugins/personal/posix/main.inc | 2 +- 15 files changed, 63 insertions(+), 63 deletions(-) diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 430382fbf..650389ca7 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -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 diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc index 251822d6d..822905930 100644 --- a/gosa-core/plugins/admin/acl/class_aclRole.inc +++ b/gosa-core/plugins/admin/acl/class_aclRole.inc @@ -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); } diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc index 099d1967f..71686c1ac 100644 --- a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc @@ -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); } diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 96d0ec353..5edf9e57a 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -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(); diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index 59ad363be..92a2865bf 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -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; diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index da14a33fe..f0045b3d5 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -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')); /******************** diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 9aeff5655..b038bf661 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -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(); diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index 634d863c9..b4f98f9c6 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -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 = ""; diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 9bf6ea459..98e2b87e9 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -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 diff --git a/gosa-core/plugins/generic/welcome/main.inc b/gosa-core/plugins/generic/welcome/main.inc index c36520503..5be00b005 100644 --- a/gosa-core/plugins/generic/welcome/main.inc +++ b/gosa-core/plugins/generic/welcome/main.inc @@ -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")); diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index adb14ec18..a11dd5c6f 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -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); diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc index 63c770065..b0687b880 100644 --- a/gosa-core/plugins/personal/generic/main.inc +++ b/gosa-core/plugins/personal/generic/main.inc @@ -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); } } diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc index db087e57c..a706ea861 100644 --- a/gosa-core/plugins/personal/password/class_password.inc +++ b/gosa-core/plugins/personal/password/class_password.inc @@ -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))); } diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc index 213850ee1..333af961f 100644 --- a/gosa-core/plugins/personal/posix/class_posixAccount.inc +++ b/gosa-core/plugins/personal/posix/class_posixAccount.inc @@ -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"; } diff --git a/gosa-core/plugins/personal/posix/main.inc b/gosa-core/plugins/personal/posix/main.inc index ffbd769fb..af4e0cabc 100644 --- a/gosa-core/plugins/personal/posix/main.inc +++ b/gosa-core/plugins/personal/posix/main.inc @@ -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{ -- 2.30.2