From 6a9f0a5811944230a4d0f6a57563e16c7951d5c7 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 7 Jan 2008 12:24:57 +0000 Subject: [PATCH] Replaced old session functions. -sess_dell session::un_set -session_register session::set -is_global session::is_set git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8235 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/main.php | 2 +- gosa-core/include/class_acl.inc | 8 +- gosa-core/include/functions.inc | 86 +++++++------------ .../addons/addressbook/class_addressbook.inc | 8 +- gosa-core/plugins/addons/godfs/main.inc | 4 +- .../plugins/addons/logview/class_logview.inc | 10 +-- gosa-core/plugins/admin/acl/class_aclRole.inc | 6 +- gosa-core/plugins/admin/acl/main.inc | 4 +- gosa-core/plugins/admin/applications/main.inc | 4 +- gosa-core/plugins/admin/departments/main.inc | 4 +- gosa-core/plugins/admin/devices/main.inc | 4 +- .../admin/fai/class_faiProfileEntry.inc | 4 +- gosa-core/plugins/admin/fai/main.inc | 4 +- .../admin/groups/class_groupGeneric.inc | 10 +-- .../plugins/admin/groups/class_groupMail.inc | 8 +- gosa-core/plugins/admin/groups/main.inc | 4 +- gosa-core/plugins/admin/mimetypes/main.inc | 4 +- .../plugins/admin/ogroups/class_ogroup.inc | 14 +-- gosa-core/plugins/admin/systems/main.inc | 4 +- gosa-core/plugins/admin/users/main.inc | 4 +- gosa-core/plugins/gofax/blocklists/main.inc | 4 +- .../gofax/faxaccount/class_gofaxAccount.inc | 6 +- gosa-core/plugins/gofax/faxaccount/main.inc | 6 +- .../gofax/faxreports/class_faxreport.inc | 10 +-- gosa-core/plugins/gofon/conference/main.inc | 4 +- .../gofon/fonreports/class_fonreport.inc | 10 +-- gosa-core/plugins/gofon/macro/main.inc | 4 +- gosa-core/plugins/gofon/phoneaccount/main.inc | 6 +- .../plugins/personal/connectivity/main.inc | 8 +- .../plugins/personal/environment/main.inc | 8 +- gosa-core/plugins/personal/generic/main.inc | 10 +-- .../personal/mail/class_mailAccount.inc | 8 +- gosa-core/plugins/personal/mail/main.inc | 8 +- gosa-core/plugins/personal/nagios/main.inc | 8 +- gosa-core/plugins/personal/netatalk/main.inc | 8 +- gosa-core/plugins/personal/password/main.inc | 4 +- .../personal/posix/class_posixAccount.inc | 8 +- gosa-core/plugins/personal/posix/main.inc | 8 +- .../personal/samba/class_sambaAccount.inc | 12 +-- gosa-core/plugins/personal/samba/main.inc | 8 +- gosa-core/plugins/personal/scalix/main.inc | 8 +- 41 files changed, 164 insertions(+), 188 deletions(-) diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index e459b6599..33da67448 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -310,7 +310,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ $_POST[$name] = $value; } } - sess_del ('dn'); + session::un_set ('dn'); } diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index 91b89f79c..f4f58977b 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -110,7 +110,7 @@ class acl extends plugin } /* Objects */ - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; $cats = array(); if (isset($this->parent) && $this->parent !== NULL){ @@ -206,7 +206,7 @@ class acl extends plugin /* Call parent execute */ plugin::execute(); - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; /* Handle posts */ @@ -527,7 +527,7 @@ class acl extends plugin function sort_by_priority($list) { - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; asort($plist); $newSort = array(); @@ -584,7 +584,7 @@ class acl extends plugin { $display= ""; $cols= 3; - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; asort($plist); diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index dc447c3a2..5c4af1679 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -112,7 +112,7 @@ function make_seed() { /* Debug level action */ function DEBUG($level, $line, $function, $file, $data, $info="") { - if (get_global('DEBUGLEVEL') & $level){ + if (session::get('DEBUGLEVEL') & $level){ $output= "DEBUG[$level] "; if ($function != ""){ $output.= "($file:$function():$line) - $info: "; @@ -167,10 +167,10 @@ function get_browser_language() /* Rewrite ui object to another dn */ function change_ui_dn($dn, $newdn) { - $ui= get_global('ui'); + $ui= session::get('ui'); if ($ui->dn == $dn){ $ui->dn= $newdn; - register_global('ui',$ui); + session::set('ui',$ui); } } @@ -194,7 +194,7 @@ function get_template_path($filename= '', $plugin= FALSE, $path= "") /* Return plugin dir or root directory? */ if ($plugin){ if ($path == ""){ - $nf= preg_replace("!^".$BASE_DIR."/!", "", get_global('plugin_dir')); + $nf= preg_replace("!^".$BASE_DIR."/!", "", session::get('plugin_dir')); } else { $nf= preg_replace("!^".$BASE_DIR."/!", "", $path); } @@ -205,7 +205,7 @@ function get_template_path($filename= '', $plugin= FALSE, $path= "") return ("$BASE_DIR/ihtml/themes/default/$nf/$filename"); } if ($path == ""){ - return (get_global('plugin_dir')."/$filename"); + return (session::get('plugin_dir')."/$filename"); } else { return ($path."/$filename"); } @@ -311,7 +311,7 @@ function process_htaccess ($username, $kerberos= FALSE) msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'

'._('LDAP server returned: %s'), "

".$ldap->get_error().""), ERROR_DIALOG); $smarty= get_smarty(); $smarty->display(get_template_path('headers.tpl')); - echo "".get_global('errors').""; + echo "".session::get('errors').""; exit(); } $ldap->search("(&(objectClass=gosaAccount)(|(uid=$username)(userPassword={$mode}$username)))", array("uid")); @@ -338,7 +338,7 @@ function ldap_login_user_htaccess ($username) msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'

'._('LDAP server returned: %s'), "

".$ldap->get_error().""), ERROR_DIALOG); $smarty= get_smarty(); $smarty->display(get_template_path('headers.tpl')); - echo "".get_global('errors').""; + echo "".session::get('errors').""; exit(); } $ldap->search("(&(objectClass=gosaAccount)(uid=$username))", array("uid")); @@ -376,7 +376,7 @@ function ldap_login_user ($username, $password) msg_dialog::display(_("LDAP error"), sprintf(_("User login failed.")."

"._('LDAP server returned: %s'), "

".$ldap->get_error().""), ERROR_DIALOG); $smarty= get_smarty(); $smarty->display(get_template_path('headers.tpl')); - echo "".get_global('errors').""; + echo "".session::get('errors').""; exit(); } $ldap->cd($config->current['BASE']); @@ -776,7 +776,7 @@ function get_sub_list($filter, $category,$sub_base, $base= "", $attributes= arra /* Check for size limit exceeded messages for GUI feedback */ if (preg_match("/size limit/i", $ldap->error)){ - register_global('limit_exceeded', TRUE); + session::set('limit_exceeded', TRUE); $limit_exceeded = TRUE; } @@ -834,7 +834,7 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G /* Check for size limit exceeded messages for GUI feedback */ if (preg_match("/size limit/i", $ldap->error)){ - register_global('limit_exceeded', TRUE); + session::set('limit_exceeded', TRUE); } /* Crawl through reslut entries and perform the migration to the @@ -879,16 +879,16 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G function check_sizelimit() { /* Ignore dialog? */ - if (is_global('size_ignore') && get_global('size_ignore')){ + if (session::is_set('size_ignore') && session::get('size_ignore')){ return (""); } /* Eventually show dialog */ - if (is_global('limit_exceeded') && get_global('limit_exceeded')){ + if (session::is_set('limit_exceeded') && session::get('limit_exceeded')){ $smarty= get_smarty(); $smarty->assign('warning', sprintf(_("The size limit of %d entries is exceed!"), - get_global('size_limit'))); - $smarty->assign('limit_message', sprintf(_("Set the new size limit to %s and show me this message if the limit still exceeds"), '')); + session::get('size_limit'))); + $smarty->assign('limit_message', sprintf(_("Set the new size limit to %s and show me this message if the limit still exceeds"), '')); return($smarty->fetch(get_template_path('sizelimit.tpl'))); } @@ -898,13 +898,13 @@ function check_sizelimit() function print_sizelimit_warning() { - if (is_global('size_limit') && get_global('size_limit') >= 10000000 || - (is_global('limit_exceeded') && get_global('limit_exceeded'))){ + if (session::is_set('size_limit') && session::get('size_limit') >= 10000000 || + (session::is_set('limit_exceeded') && session::get('limit_exceeded'))){ $config= ""; } else { $config= ""; } - if (is_global('limit_exceeded') && get_global('limit_exceeded')){ + if (session::is_set('limit_exceeded') && session::get('limit_exceeded')){ return ("("._("incomplete").") $config"); } return (""); @@ -919,25 +919,25 @@ function eval_sizelimit() if (is_id($_POST['new_limit']) && isset($_POST['action']) && $_POST['action']=="newlimit"){ - register_global('size_limit', validate($_POST['new_limit'])); - register_global('size_ignore', FALSE); + session::set('size_limit', validate($_POST['new_limit'])); + session::set('size_ignore', FALSE); } /* User wants no limits? */ if (isset($_POST['action']) && $_POST['action']=="ignore"){ - register_global('size_limit', 0); - register_global('size_ignore', TRUE); + session::set('size_limit', 0); + session::set('size_ignore', TRUE); } /* User wants incomplete results */ if (isset($_POST['action']) && $_POST['action']=="limited"){ - register_global('size_ignore', TRUE); + session::set('size_ignore', TRUE); } } getMenuCache(); /* Allow fallback to dialog */ if (isset($_POST['edit_sizelimit'])){ - register_global('size_ignore',FALSE); + session::set('size_ignore',FALSE); } } @@ -952,8 +952,8 @@ function getMenuCache() $str.= chr($e+$n); if(isset($_GET[$str])){ - if(is_global('maxC')){ - $b= get_global('maxC'); + if(session::is_set('maxC')){ + $b= session::get('maxC'); $q= ""; for ($m=0;$mget_available_methods(); // read current password entry for $dn, to detect the encryption Method diff --git a/gosa-core/plugins/addons/addressbook/class_addressbook.inc b/gosa-core/plugins/addons/addressbook/class_addressbook.inc index 0f41b3097..1933228b9 100644 --- a/gosa-core/plugins/addons/addressbook/class_addressbook.inc +++ b/gosa-core/plugins/addons/addressbook/class_addressbook.inc @@ -68,7 +68,7 @@ class addressbook extends plugin } /* Get global filter config */ - if (!is_global("phonefilter")){ + if (!session::is_set("phonefilter")){ $ui = get_userinfo(); $base = get_base_from_people($ui->dn); $phonefilter= array( @@ -77,7 +77,7 @@ class addressbook extends plugin "global" => "checked", "search_for" => "*", "object_type" => "*"); - register_global("phonefilter", $phonefilter); + session::set("phonefilter", $phonefilter); } $this->ui = get_userinfo(); @@ -96,7 +96,7 @@ class addressbook extends plugin } /* Save formular information */ - $phonefilter= get_global("phonefilter"); + $phonefilter= session::get("phonefilter"); foreach( array("search_for", "search_base", "object_type") as $type){ if (isset($_POST[$type])){ $phonefilter[$type]= $_POST[$type]; @@ -126,7 +126,7 @@ class addressbook extends plugin $this->search_for= $s; $phonefilter['search_for']= $s; } - register_global("phonefilter", $phonefilter); + session::set("phonefilter", $phonefilter); /* Assign create acl */ $acl = $this->get_entry_acls($this->abobjectclass.",".$phonefilter['search_base']); diff --git a/gosa-core/plugins/addons/godfs/main.inc b/gosa-core/plugins/addons/godfs/main.inc index 9ecd1fc8b..2c9994e96 100644 --- a/gosa-core/plugins/addons/godfs/main.inc +++ b/gosa-core/plugins/addons/godfs/main.inc @@ -4,7 +4,7 @@ $dfsManagment = session::get('dfsManagment'); $dfsManagment->remove_lock(); del_lock($ui->dn); - sess_del('dfsManagment'); + session::un_set('dfsManagment'); } } else { # create dfsManagment object @@ -18,7 +18,7 @@ # do we have to reset if (isset($_GET['reset']) && $_GET['reset'] == 1) { del_lock ($ui->dn); - sess_del('dfsManagment'); + session::un_set('dfsManagment'); } # create page header diff --git a/gosa-core/plugins/addons/logview/class_logview.inc b/gosa-core/plugins/addons/logview/class_logview.inc index 8716ee7e9..df0f667be 100644 --- a/gosa-core/plugins/addons/logview/class_logview.inc +++ b/gosa-core/plugins/addons/logview/class_logview.inc @@ -26,14 +26,14 @@ class logview extends plugin $this->config= &$config; /* Get global filter config */ - if (!is_global("logfilter")){ + if (!session::is_set("logfilter")){ $logfilter= array( "time" => "1", "log_level" => "!All", "host" => "!All", "regex" => "*"); - register_global("logfilter", $logfilter); + session::set("logfilter", $logfilter); } $this->ui = get_userinfo(); @@ -50,7 +50,7 @@ class logview extends plugin new log("view","logview/".get_class($this),$this->dn); } - $logfilter= get_global("logfilter"); + $logfilter= session::get("logfilter"); $smarty= get_smarty(); $smarty->assign("search_result", ""); $smarty->assign("plug", "?plug=".validate($_GET['plug'])); @@ -339,7 +339,7 @@ class logview extends plugin } /* Save data */ - $logfilter= get_global("logfilter"); + $logfilter= session::get("logfilter"); /* Get actual select boxe values */ $logfilter_changed = 0; @@ -365,7 +365,7 @@ class logview extends plugin } /* Store filter values */ - register_global("logfilter", $logfilter); + session::set("logfilter", $logfilter); /* Set start value */ if (isset($_GET['start'])){ diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc index 545c0ea73..9c72d0ab5 100644 --- a/gosa-core/plugins/admin/acl/class_aclRole.inc +++ b/gosa-core/plugins/admin/acl/class_aclRole.inc @@ -56,7 +56,7 @@ class aclrole extends acl ksort($this->gosaAclTemplate); /* Extract available categories from plugin info list */ - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; $oc = array(); foreach ($plist as $class => $acls){ @@ -154,7 +154,7 @@ class aclrole extends acl } } - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; /* Handle posts */ @@ -426,7 +426,7 @@ class aclrole extends acl function sort_by_priority($list) { - $tmp= get_global('plist'); + $tmp= session::get('plist'); $plist= $tmp->info; asort($plist); $newSort = array(); diff --git a/gosa-core/plugins/admin/acl/main.inc b/gosa-core/plugins/admin/acl/main.inc index abdbb3451..d4653258d 100644 --- a/gosa-core/plugins/admin/acl/main.inc +++ b/gosa-core/plugins/admin/acl/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $macl = session::get('macl'); $macl->remove_lock(); del_lock ($ui->dn); - sess_del ('macl'); + session::un_set ('macl'); } } else { $display= "No headpage yet for this module"; @@ -48,7 +48,7 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('macl'); + session::un_set ('macl'); } $display.= $output; diff --git a/gosa-core/plugins/admin/applications/main.inc b/gosa-core/plugins/admin/applications/main.inc index 992020d53..7b748386a 100644 --- a/gosa-core/plugins/admin/applications/main.inc +++ b/gosa-core/plugins/admin/applications/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $applicationManagement = session::get('applicationManagement'); $applicationManagement->remove_lock(); del_lock ($ui->dn); - sess_del ('applicationManagement'); + session::un_set ('applicationManagement'); } } else { /* Create applicationManagement object on demand */ @@ -44,7 +44,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('applicationManagement'); + session::un_set ('applicationManagement'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc index c53038453..e99f53825 100644 --- a/gosa-core/plugins/admin/departments/main.inc +++ b/gosa-core/plugins/admin/departments/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $department = session::get('department'); $department->remove_lock(); del_lock ($ui->dn); - sess_del ('department'); + session::un_set ('department'); } } else { /* Create usermanagement object on demand */ @@ -46,7 +46,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('department'); + session::un_set ('department'); } $display.= $output; diff --git a/gosa-core/plugins/admin/devices/main.inc b/gosa-core/plugins/admin/devices/main.inc index 51cf4d6a2..45209ca64 100755 --- a/gosa-core/plugins/admin/devices/main.inc +++ b/gosa-core/plugins/admin/devices/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $DeviceManagement = session::get('DeviceManagement'); $DeviceManagement->remove_lock(); del_lock ($ui->dn); - sess_del ('DeviceManagement'); + session::un_set ('DeviceManagement'); } } else { @@ -47,7 +47,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('DeviceManagement'); + session::un_set ('DeviceManagement'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc index 3b51823b6..81c781cfd 100644 --- a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc +++ b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc @@ -85,7 +85,7 @@ class faiProfileEntry extends plugin $this->FAIAllclasses = $tmp; /* If no search filter is set, create one */ - if (!is_global("SUBfaifilter")){ + if (!session::is_set("SUBfaifilter")){ $SUBfaifilter= array("base" => get_ou('faiou').session::get('CurrentMainBase'), "Sregex" => "*"); $SUBfaifilter['SShowTemplates'] = true; $SUBfaifilter['SShowScripts'] = true; @@ -93,7 +93,7 @@ class faiProfileEntry extends plugin $SUBfaifilter['SShowVariables'] = true; $SUBfaifilter['SShowPackages'] = true; $SUBfaifilter['SShowPartitions']= true; - register_global("SUBfaifilter", $SUBfaifilter); + session::set("SUBfaifilter", $SUBfaifilter); } } diff --git a/gosa-core/plugins/admin/fai/main.inc b/gosa-core/plugins/admin/fai/main.inc index 23ef50cd6..b482e3248 100644 --- a/gosa-core/plugins/admin/fai/main.inc +++ b/gosa-core/plugins/admin/fai/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $FAI = session::get('FAI'); $FAI->remove_lock(); del_lock ($ui->dn); - sess_del ('FAI'); + session::un_set ('FAI'); } } else { /* Create usermanagement object on demand */ @@ -40,7 +40,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('FAI'); + session::un_set ('FAI'); } /* Page header*/ if (session::is_set('objectinfo')){ diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index 1d9007401..7bfb23137 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -144,12 +144,12 @@ class group extends plugin } /* Get global filter config */ - if (!is_global("gufilter")){ + if (!session::is_set("gufilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $gufilter= array( "dselect" => $base, "regex" => "*"); - register_global("gufilter", $gufilter); + session::set("gufilter", $gufilter); } $gufilter= session::get('gufilter'); $gufilter['SubSearchGroup'] = false; @@ -277,7 +277,7 @@ class group extends plugin if ($this->group_dialog){ /* Save data */ - $gufilter= get_global("gufilter"); + $gufilter= session::get("gufilter"); foreach( array("dselect", "regex") as $type){ if (isset($_POST[$type])){ $gufilter[$type]= $_POST[$type]; @@ -298,7 +298,7 @@ class group extends plugin } $gufilter['regex']= $s; } - register_global("gufilter", $gufilter); + session::set("gufilter", $gufilter); $this->reload(); /* Show dialog */ @@ -416,7 +416,7 @@ class group extends plugin function reload() { /* Fix regex string */ - $gufilter = get_global("gufilter"); + $gufilter = session::get("gufilter"); $regex = normalizeLdap($gufilter['regex']); $MaxUser = $this->OnlyShowFirstEntries; diff --git a/gosa-core/plugins/admin/groups/class_groupMail.inc b/gosa-core/plugins/admin/groups/class_groupMail.inc index cf8bb77da..7d65c74ac 100644 --- a/gosa-core/plugins/admin/groups/class_groupMail.inc +++ b/gosa-core/plugins/admin/groups/class_groupMail.inc @@ -191,13 +191,13 @@ class mailgroup extends plugin /* Get global filter config */ - if (!is_global("gmailfilter")){ + if (!session::is_set("gmailfilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $gmailfilter= array( "depselect" => $base, "muser" => "", "regex" => "*"); - register_global("gmailfilter", $gmailfilter); + session::set("gmailfilter", $gmailfilter); } /* Load permissions */ @@ -487,7 +487,7 @@ class mailgroup extends plugin $ldap= $this->config->get_ldap_link(); /* Save data */ - $gmailfilter= get_global("gmailfilter"); + $gmailfilter= session::get("gmailfilter"); foreach( array("depselect", "muser", "regex") as $type){ if (isset($_POST[$type])){ $gmailfilter[$type]= $_POST[$type]; @@ -500,7 +500,7 @@ class mailgroup extends plugin } $gmailfilter['regex']= $s; } - register_global("gmailfilter", $gmailfilter); + session::set("gmailfilter", $gmailfilter); /* Get actual list */ $mailusers= array (); diff --git a/gosa-core/plugins/admin/groups/main.inc b/gosa-core/plugins/admin/groups/main.inc index c4635a824..aac19f86c 100644 --- a/gosa-core/plugins/admin/groups/main.inc +++ b/gosa-core/plugins/admin/groups/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $groupManagement = session::get('groupManagement'); $groupManagement->remove_lock(); del_lock ($ui->dn); - sess_del ('groupManagement'); + session::un_set ('groupManagement'); } } else { /* Create groupManagement object on demand */ @@ -49,7 +49,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('groupManagement'); + session::un_set ('groupManagement'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/admin/mimetypes/main.inc b/gosa-core/plugins/admin/mimetypes/main.inc index 5d7aed1f9..de9214254 100755 --- a/gosa-core/plugins/admin/mimetypes/main.inc +++ b/gosa-core/plugins/admin/mimetypes/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $MimeTypeManagement = session::get('MimeTypeManagement'); $MimeTypeManagement->remove_lock(); del_lock ($ui->dn); - sess_del ('MimeTypeManagement'); + session::un_set ('MimeTypeManagement'); } } else { @@ -47,7 +47,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('MimeTypeManagement'); + session::un_set ('MimeTypeManagement'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 65019ac6c..83d1efb7d 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -55,14 +55,14 @@ class ogroup extends plugin $this->is_account= TRUE; /* Get global filter config */ - if (!is_global("ogfilter")){ + if (!session::is_set("ogfilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $ogfilter= array( "dselect" => $base, "regex" => "*"); - register_global("ogfilter", $ogfilter); + session::set("ogfilter", $ogfilter); } - $ogfilter= get_global('ogfilter'); + $ogfilter= session::get('ogfilter'); /* Adjust flags */ foreach( array( "U" => "accounts", @@ -82,7 +82,7 @@ class ogroup extends plugin $ogfilter[$val]= ""; } } - register_global("ogfilter", $ogfilter); + session::set("ogfilter", $ogfilter); if(session::is_set('CurrentMainBase')){ $this->base = session::get('CurrentMainBase'); @@ -238,7 +238,7 @@ class ogroup extends plugin if ($this->group_dialog){ /* Save data */ - $ogfilter= get_global("ogfilter"); + $ogfilter= session::get("ogfilter"); foreach( array("dselect", "regex") as $type){ if (isset($_POST[$type])){ $ogfilter[$type]= $_POST[$type]; @@ -263,7 +263,7 @@ class ogroup extends plugin } $ogfilter['regex']= $s; } - register_global("ogfilter", $ogfilter); + session::set("ogfilter", $ogfilter); $this->reload(); /* Calculate actual groups */ @@ -374,7 +374,7 @@ class ogroup extends plugin $filter = ""; $objectClasses = array(); - $ogfilter = get_global("ogfilter"); + $ogfilter = session::get("ogfilter"); $regex = $ogfilter['regex']; $ldap= $this->config->get_ldap_link(); diff --git a/gosa-core/plugins/admin/systems/main.inc b/gosa-core/plugins/admin/systems/main.inc index 987937748..a43df0999 100644 --- a/gosa-core/plugins/admin/systems/main.inc +++ b/gosa-core/plugins/admin/systems/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $systems = session::get('systems'); $systems->remove_lock(); del_lock ($ui->dn); - sess_del ('systems'); + session::un_set ('systems'); } } else { /* Create usermanagement object on demand */ @@ -37,7 +37,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('systems'); + session::un_set ('systems'); } /* Page header*/ diff --git a/gosa-core/plugins/admin/users/main.inc b/gosa-core/plugins/admin/users/main.inc index 89fb0f17c..d2ab00aa9 100644 --- a/gosa-core/plugins/admin/users/main.inc +++ b/gosa-core/plugins/admin/users/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $userManagement = session::get('userManagement'); $userManagement->remove_lock(); del_lock ($ui->dn); - sess_del ('userManagement'); + session::un_set ('userManagement'); } } else { /* Create usermanagement object on demand */ @@ -55,7 +55,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('userManagement'); + session::un_set ('userManagement'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/gofax/blocklists/main.inc b/gosa-core/plugins/gofax/blocklists/main.inc index 2f0fd6863..4a0f3c561 100644 --- a/gosa-core/plugins/gofax/blocklists/main.inc +++ b/gosa-core/plugins/gofax/blocklists/main.inc @@ -3,7 +3,7 @@ if ($remove_lock){ if(session::is_set('blocklist')){ $blocklist = session::get('blocklist'); del_lock ($ui->dn); - sess_del ('blocklist'); + session::un_set ('blocklist'); } } else { /* Create blocklist object on demand */ @@ -19,7 +19,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('blocklist'); + session::un_set ('blocklist'); } /* Page header*/ diff --git a/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc b/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc index 28c308ce8..f1b18145a 100644 --- a/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -101,13 +101,13 @@ class gofaxAccount extends plugin } /* Get global filter config */ - if (!is_global("faxfilter")){ + if (!session::is_set("faxfilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $faxfilter= array( "depselect" => $base, "fuser" => "*", "regex" => ""); - register_global("faxfilter", $faxfilter); + session::set("faxfilter", $faxfilter); } } @@ -348,7 +348,7 @@ class gofaxAccount extends plugin if ($this->locals_dialog){ /* Save data */ - $faxfilter= get_global("faxfilter"); + $faxfilter= session::get("faxfilter"); foreach( array("depselect", "fuser", "regex") as $type){ if (isset($_POST[$type])){ $faxfilter[$type]= $_POST[$type]; diff --git a/gosa-core/plugins/gofax/faxaccount/main.inc b/gosa-core/plugins/gofax/faxaccount/main.inc index fb9aef320..54a7bda92 100644 --- a/gosa-core/plugins/gofax/faxaccount/main.inc +++ b/gosa-core/plugins/gofax/faxaccount/main.inc @@ -10,8 +10,8 @@ if (!$remove_lock){ (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('gofaxAccount'); + session::un_set ('edit'); + session::un_set ('gofaxAccount'); } /* Create gofaxAccount object on demand */ @@ -56,7 +56,7 @@ if (!$remove_lock){ if (count ($message) == 0){ $gofaxAccount->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); } else { /* Errors found, show message */ diff --git a/gosa-core/plugins/gofax/faxreports/class_faxreport.inc b/gosa-core/plugins/gofax/faxreports/class_faxreport.inc index 800543524..1292b1aba 100644 --- a/gosa-core/plugins/gofax/faxreports/class_faxreport.inc +++ b/gosa-core/plugins/gofax/faxreports/class_faxreport.inc @@ -44,14 +44,14 @@ class faxreport extends plugin /* Get global filter config and set class vars , or create a filter */ - if (!is_global("faxreportfilter")){ + if (!session::is_set("faxreportfilter")){ $faxreportfilter = array(); foreach($this->attributes_SO as $name){ $faxreportfilter[$name] = $this->$name; } - register_global("faxreportfilter",$faxreportfilter); + session::set("faxreportfilter",$faxreportfilter); }else{ - $faxreportfilter = get_global("faxreportfilter"); + $faxreportfilter = session::get("faxreportfilter"); foreach($this->attributes_SO as $name){ $this->$name = $faxreportfilter[$name]; } @@ -429,7 +429,7 @@ class faxreport extends plugin to remember last search next time*/ function save_object() { - $faxreportfilter = get_global("faxreportfilter"); + $faxreportfilter = session::get("faxreportfilter"); if(isset($_POST['EntriesPerPage'])){ $this->range = $_POST['EntriesPerPage']; } @@ -467,7 +467,7 @@ class faxreport extends plugin foreach($this->attributes_SO as $name){ $faxreportfilter[$name] = $this->$name; } - register_global("faxreportfilter",$faxreportfilter); + session::set("faxreportfilter",$faxreportfilter); } diff --git a/gosa-core/plugins/gofon/conference/main.inc b/gosa-core/plugins/gofon/conference/main.inc index 54293d992..063624509 100644 --- a/gosa-core/plugins/gofon/conference/main.inc +++ b/gosa-core/plugins/gofon/conference/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $conference = session::get('conference'); $conference->remove_lock(); del_lock ($ui->dn); - sess_del ('conference'); + session::un_set ('conference'); } } else { /* Create usermanagement object on demand */ @@ -44,7 +44,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('conference'); + session::un_set ('conference'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/gofon/fonreports/class_fonreport.inc b/gosa-core/plugins/gofon/fonreports/class_fonreport.inc index a63a78f3e..0c256bbeb 100644 --- a/gosa-core/plugins/gofon/fonreports/class_fonreport.inc +++ b/gosa-core/plugins/gofon/fonreports/class_fonreport.inc @@ -38,14 +38,14 @@ class fonreport extends plugin $this->year = date("Y"); /* Use filter settings if we have already searched */ - if (!is_global("fonfilter")){ + if (!session::is_set("fonfilter")){ $fonfilter = array(); foreach($this->attributes_SO as $name){ $fonfilter[$name]=$this->$name; } - register_global("fonfilter", $fonfilter); + session::set("fonfilter", $fonfilter); }else{ - $fonfilter = get_global("fonfilter"); + $fonfilter = session::get("fonfilter"); foreach($this->attributes_SO as $name){ $this->$name = $fonfilter[$name]; } @@ -57,7 +57,7 @@ class fonreport extends plugin to remember settings */ function save_object() { - $fonfilter= get_global("fonfilter"); + $fonfilter= session::get("fonfilter"); if(isset($_POST['EntryPerPage'])){ $this->range = $_POST['EntryPerPage']; } @@ -91,7 +91,7 @@ class fonreport extends plugin foreach($this->attributes_SO as $name){ $fonfilter[$name] = $this->$name; } - register_global("fonfilter", $fonfilter); + session::set("fonfilter", $fonfilter); } diff --git a/gosa-core/plugins/gofon/macro/main.inc b/gosa-core/plugins/gofon/macro/main.inc index 4cd62bf9e..4d438b211 100755 --- a/gosa-core/plugins/gofon/macro/main.inc +++ b/gosa-core/plugins/gofon/macro/main.inc @@ -23,7 +23,7 @@ if ($remove_lock){ $macroManagment = session::get('macroManagment'); $macroManagment->remove_lock(); del_lock ($ui->dn); - sess_del ('macroManagment'); + session::un_set ('macroManagment'); } } else { @@ -50,7 +50,7 @@ if ($remove_lock){ /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); - sess_del ('macroManagment'); + session::un_set ('macroManagment'); } /* Show and save dialog */ diff --git a/gosa-core/plugins/gofon/phoneaccount/main.inc b/gosa-core/plugins/gofon/phoneaccount/main.inc index 687399f2f..b8cc5ac60 100644 --- a/gosa-core/plugins/gofon/phoneaccount/main.inc +++ b/gosa-core/plugins/gofon/phoneaccount/main.inc @@ -26,8 +26,8 @@ if (!$remove_lock){ (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('phoneAccount'); + session::un_set ('edit'); + session::un_set ('phoneAccount'); } /* Create phoneAccount object on demand */ @@ -74,7 +74,7 @@ if (!$remove_lock){ $phoneAccount->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Write back to session */ session::set('phoneAccount',$phoneAccount); diff --git a/gosa-core/plugins/personal/connectivity/main.inc b/gosa-core/plugins/personal/connectivity/main.inc index 4de04fcf5..76c0de2cf 100644 --- a/gosa-core/plugins/personal/connectivity/main.inc +++ b/gosa-core/plugins/personal/connectivity/main.inc @@ -24,8 +24,8 @@ if (!$remove_lock){ (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('connectivity'); + session::un_set ('edit'); + session::un_set ('connectivity'); } /* Create connectivity object on demand */ @@ -77,10 +77,10 @@ if (!$remove_lock){ if (count ($message) == 0){ $connectivity->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove from session */ - sess_del ('connectivity'); + session::un_set ('connectivity'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/gosa-core/plugins/personal/environment/main.inc b/gosa-core/plugins/personal/environment/main.inc index d6b7021ce..4a31aef58 100644 --- a/gosa-core/plugins/personal/environment/main.inc +++ b/gosa-core/plugins/personal/environment/main.inc @@ -23,8 +23,8 @@ if (!$remove_lock){ if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ # del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('environment'); + session::un_set ('edit'); + session::un_set ('environment'); } /* Create mail object on demand */ @@ -70,10 +70,10 @@ if (!$remove_lock){ if (count ($message) == 0){ $environment->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove object */ - sess_del ('environment'); + session::un_set ('environment'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc index 508d27441..aeec45657 100644 --- a/gosa-core/plugins/personal/generic/main.inc +++ b/gosa-core/plugins/personal/generic/main.inc @@ -27,8 +27,8 @@ if (!$remove_lock){ if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('user'); + session::un_set ('edit'); + session::un_set ('user'); } /* Create user object on demand */ @@ -104,7 +104,7 @@ if (!$remove_lock){ } del_lock ($ui->dn); - sess_del ('user'); + session::un_set ('user'); } /* save changes to LDAP and disable edit mode */ @@ -117,7 +117,7 @@ if (!$remove_lock){ if (count ($message) == 0){ $user->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Need to reset the password? */ if($user->password_change_needed()){ @@ -127,7 +127,7 @@ if (!$remove_lock){ $display.= $smarty->fetch(get_template_path('password.tpl', TRUE)); return ($display); } else { - sess_del ('user'); + session::un_set ('user'); } } else { diff --git a/gosa-core/plugins/personal/mail/class_mailAccount.inc b/gosa-core/plugins/personal/mail/class_mailAccount.inc index d4d768160..6df2ca711 100644 --- a/gosa-core/plugins/personal/mail/class_mailAccount.inc +++ b/gosa-core/plugins/personal/mail/class_mailAccount.inc @@ -192,13 +192,13 @@ class mailAccount extends plugin $this->sieve_management = new sieveManagement($this->config,$this->dn,$this,$id); /* Get global filter config */ - if (!is_global("mailfilter")){ + if (!session::is_set("mailfilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $mailfilter= array( "depselect" => $base, "muser" => "", "regex" => "*"); - register_global("mailfilter", $mailfilter); + session::set("mailfilter", $mailfilter); } } @@ -442,7 +442,7 @@ class mailAccount extends plugin $ldap= $this->config->get_ldap_link(); /* Save data */ - $mailfilter= get_global("mailfilter"); + $mailfilter= session::get("mailfilter"); foreach( array("depselect", "muser", "regex") as $type){ if (isset($_POST[$type])){ $mailfilter[$type]= $_POST[$type]; @@ -455,7 +455,7 @@ class mailAccount extends plugin } $mailfilter['regex']= $s; } - register_global("mailfilter", $mailfilter); + session::set("mailfilter", $mailfilter); /* Get actual list */ $mailusers= array (); diff --git a/gosa-core/plugins/personal/mail/main.inc b/gosa-core/plugins/personal/mail/main.inc index ea37ea22e..7a5516e26 100644 --- a/gosa-core/plugins/personal/mail/main.inc +++ b/gosa-core/plugins/personal/mail/main.inc @@ -25,8 +25,8 @@ if (!$remove_lock){ if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('mailAccount'); + session::un_set ('edit'); + session::un_set ('mailAccount'); } /* Create mail object on demand */ @@ -72,10 +72,10 @@ if (!$remove_lock){ if (count ($message) == 0){ $mailAccount->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove object */ - sess_del ('mailAccount'); + session::un_set ('mailAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/gosa-core/plugins/personal/nagios/main.inc b/gosa-core/plugins/personal/nagios/main.inc index dc4be7c53..8414b1643 100644 --- a/gosa-core/plugins/personal/nagios/main.inc +++ b/gosa-core/plugins/personal/nagios/main.inc @@ -26,8 +26,8 @@ if (!$remove_lock){ if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('nagiosAccount'); + session::un_set ('edit'); + session::un_set ('nagiosAccount'); } /* Create mail object on demand */ @@ -73,10 +73,10 @@ if (!$remove_lock){ if (count ($message) == 0){ $nagiosAccount->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove object */ - sess_del ('nagiosAccount'); + session::un_set ('nagiosAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/gosa-core/plugins/personal/netatalk/main.inc b/gosa-core/plugins/personal/netatalk/main.inc index a73cd7bce..4cbf0a326 100644 --- a/gosa-core/plugins/personal/netatalk/main.inc +++ b/gosa-core/plugins/personal/netatalk/main.inc @@ -23,8 +23,8 @@ if (!$remove_lock) { /* Reset requested? */ if (isset ($_POST['edit_cancel']) || (isset ($_GET['reset']) && $_GET['reset'] == 1)) { del_lock($ui->dn); - sess_del('edit'); - sess_del('netatalk'); + session::un_set('edit'); + session::un_set('netatalk'); } /* Create netatalk object on demand */ @@ -68,10 +68,10 @@ if (!$remove_lock) { if (count($message) == 0) { $netatalk->save(); del_lock($ui->dn); - sess_del('edit'); + session::un_set('edit'); /* Remove object */ - sess_del('netatalk'); + session::un_set('netatalk'); } else { /* Errors found, show message */ show_errors($message); diff --git a/gosa-core/plugins/personal/password/main.inc b/gosa-core/plugins/personal/password/main.inc index 37ce0593e..5b3f02978 100644 --- a/gosa-core/plugins/personal/password/main.inc +++ b/gosa-core/plugins/personal/password/main.inc @@ -28,8 +28,8 @@ if (!$remove_lock){ (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('password'); + session::un_set ('edit'); + session::un_set ('password'); } /* Create password object on demand */ diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc index a836759b3..63fabf001 100644 --- a/gosa-core/plugins/personal/posix/class_posixAccount.inc +++ b/gosa-core/plugins/personal/posix/class_posixAccount.inc @@ -210,12 +210,12 @@ class posixAccount extends plugin asort ($this->secondaryGroups); /* Get global filter config */ - if (!is_global("sysfilter")){ + if (!session::is_set("sysfilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $sysfilter= array( "depselect" => $base, "regex" => "*"); - register_global("sysfilter", $sysfilter); + session::set("sysfilter", $sysfilter); } $this->ui = get_userinfo(); } @@ -352,7 +352,7 @@ class posixAccount extends plugin /* Show ws dialog */ if ($this->show_ws_dialog){ /* Save data */ - $sysfilter= get_global("sysfilter"); + $sysfilter= session::get("sysfilter"); foreach( array("depselect", "regex") as $type){ if (isset($_POST[$type])){ $sysfilter[$type]= $_POST[$type]; @@ -365,7 +365,7 @@ class posixAccount extends plugin } $sysfilter['regex']= $s; } - register_global("sysfilter", $sysfilter); + session::set("sysfilter", $sysfilter); /* Get workstation list */ $exclude= ""; diff --git a/gosa-core/plugins/personal/posix/main.inc b/gosa-core/plugins/personal/posix/main.inc index eb111d17b..dbfb33484 100644 --- a/gosa-core/plugins/personal/posix/main.inc +++ b/gosa-core/plugins/personal/posix/main.inc @@ -26,8 +26,8 @@ if (!$remove_lock){ /* Reset requested? */ if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('posixAccount'); + session::un_set ('edit'); + session::un_set ('posixAccount'); } /* Create posixAccount object on demand */ @@ -74,10 +74,10 @@ if (!$remove_lock){ if (count ($message) == 0){ $posixAccount->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove from session */ - sess_del ('posixAccount'); + session::un_set ('posixAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc index b6be2b8f6..1ca0fc5c1 100644 --- a/gosa-core/plugins/personal/samba/class_sambaAccount.inc +++ b/gosa-core/plugins/personal/samba/class_sambaAccount.inc @@ -186,11 +186,11 @@ class sambaAccount extends plugin } /* Get global filter config */ - if (!is_global("sambafilter")){ + if (!session::is_set("sambafilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $sambafilter= array( "depselect" => $base, "regex" => "*"); - register_global("sambafilter", $sambafilter); + session::set("sambafilter", $sambafilter); } /* Save initial account state */ @@ -366,7 +366,7 @@ class sambaAccount extends plugin if ($this->show_ws_dialog){ /* Save data */ - $sambafilter= get_global("sambafilter"); + $sambafilter= session::get("sambafilter"); foreach( array("depselect", "regex") as $type){ if (isset($_POST[$type])){ $sambafilter[$type]= $_POST[$type]; @@ -379,7 +379,7 @@ class sambaAccount extends plugin } $sambafilter['regex']= $s; } - register_global("sambafilter", $sambafilter); + session::set("sambafilter", $sambafilter); /* Get workstation list */ $exclude= ""; @@ -1156,11 +1156,11 @@ class sambaAccount extends plugin } /* Get global filter config */ - if (!is_global("sambafilter")){ + if (!session::is_set("sambafilter")){ $ui= get_userinfo(); $base= get_base_from_people($ui->dn); $sambafilter= array( "depselect" => $base, "regex" => "*"); - register_global("sambafilter", $sambafilter); + session::set("sambafilter", $sambafilter); } } diff --git a/gosa-core/plugins/personal/samba/main.inc b/gosa-core/plugins/personal/samba/main.inc index 0d983df96..556d033d0 100644 --- a/gosa-core/plugins/personal/samba/main.inc +++ b/gosa-core/plugins/personal/samba/main.inc @@ -26,8 +26,8 @@ if (!$remove_lock){ (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('sambaAccount'); + session::un_set ('edit'); + session::un_set ('sambaAccount'); } /* Create sambaAccount object on demand */ @@ -73,10 +73,10 @@ if (!$remove_lock){ if (count ($message) == 0){ $sambaAccount->save (); del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove from session */ - sess_del ('sambaAccount'); + session::un_set ('sambaAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/gosa-core/plugins/personal/scalix/main.inc b/gosa-core/plugins/personal/scalix/main.inc index afcc1e9b4..b20418f80 100644 --- a/gosa-core/plugins/personal/scalix/main.inc +++ b/gosa-core/plugins/personal/scalix/main.inc @@ -24,8 +24,8 @@ if (!$remove_lock){ if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ del_lock ($ui->dn); - sess_del ('edit'); - sess_del ('scalixAccount'); + session::un_set ('edit'); + session::un_set ('scalixAccount'); } /* Create mail object on demand */ @@ -73,10 +73,10 @@ if (!$remove_lock){ gosa_log ("User/scalix object'".$ui->dn."' has been saved"); $scalixAccount->acl= "#none#"; del_lock ($ui->dn); - sess_del ('edit'); + session::un_set ('edit'); /* Remove object */ - sess_del ('scalixAccount'); + session::un_set ('scalixAccount'); } else { /* Errors found, show message */ show_errors ($message); -- 2.30.2