From: hickert Date: Fri, 4 Jan 2008 06:50:37 +0000 (+0000) Subject: Modified all session calls of this type X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7bea995f818b70008536189c66f3d2c016ea50d3;p=gosa.git Modified all session calls of this type isset($_SESSION['...']) to session::is_set('...') git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8201 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index d604d994b..c1c504d52 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -122,7 +122,7 @@ if(session::get('Last_init_lang',$lang)){ session::set('Last_init_lang',$lang); /* Preset current main base */ -if(session::is_set('CurrentMainBase')){ +if(!session::is_set('CurrentMainBase')){ session::set('CurrentMainBase',get_base_from_people($ui->dn)); } diff --git a/gosa-core/plugins/addons/godfs/main.inc b/gosa-core/plugins/addons/godfs/main.inc index 56fc3c0e4..433f9be92 100644 --- a/gosa-core/plugins/addons/godfs/main.inc +++ b/gosa-core/plugins/addons/godfs/main.inc @@ -22,7 +22,7 @@ } # create page header - if (isset($_SESSION['objectinfo'])) { + if (session::is_set('objectinfo')) { $display = print_header(get_template_path('images/dfs.png'), _("Distributed File System Administration"), "\"\"set_acl_category("gotomasses"); diff --git a/gosa-core/plugins/addons/ldapmanager/main.inc b/gosa-core/plugins/addons/ldapmanager/main.inc index 696c14add..f2955a35c 100644 --- a/gosa-core/plugins/addons/ldapmanager/main.inc +++ b/gosa-core/plugins/addons/ldapmanager/main.inc @@ -20,7 +20,7 @@ if (!$remove_lock){ /* Create phonelist object on demand */ - if (!isset($_SESSION['ldif']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('ldif') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['ldif']= new ldif ($config); $_SESSION['ldif']->set_acl_category("logview"); } diff --git a/gosa-core/plugins/addons/mailqueue/main.inc b/gosa-core/plugins/addons/mailqueue/main.inc index 09bbe568c..37dca88c2 100644 --- a/gosa-core/plugins/addons/mailqueue/main.inc +++ b/gosa-core/plugins/addons/mailqueue/main.inc @@ -20,7 +20,7 @@ if (!$remove_lock){ /* Create mailqueue object on demand */ - if (!isset($_SESSION['mailqueue']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('mailqueue') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $ui = get_userinfo(); $_SESSION['mailqueue']= new mailqueue ($config); $_SESSION['mailqueue']->set_acl_category("mailqueue"); diff --git a/gosa-core/plugins/addons/notifications/main.inc b/gosa-core/plugins/addons/notifications/main.inc index c73698541..6d7245c75 100644 --- a/gosa-core/plugins/addons/notifications/main.inc +++ b/gosa-core/plugins/addons/notifications/main.inc @@ -20,7 +20,7 @@ if (!$remove_lock){ /* Create msgplug object on demand */ - if (!isset($_SESSION['msgplug']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('msgplug') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $ui = get_userinfo(); $_SESSION['msgplug']= new msgplug ($config); $_SESSION['msgplug']->set_acl_category("msgplug"); diff --git a/gosa-core/plugins/admin/acl/main.inc b/gosa-core/plugins/admin/acl/main.inc index bea89a962..914817c8e 100644 --- a/gosa-core/plugins/admin/acl/main.inc +++ b/gosa-core/plugins/admin/acl/main.inc @@ -19,7 +19,7 @@ */ if ($remove_lock){ - if(isset($_SESSION['macl'])){ + if(session::is_set('macl')){ $macl= $_SESSION['macl']; $macl->remove_lock(); del_lock ($ui->dn); @@ -29,7 +29,7 @@ if ($remove_lock){ $display= "No headpage yet for this module"; /* Create usermanagement object on demand */ -if (!isset($_SESSION['macl']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ +if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['macl']= new aclManagement($config, $ui); } $macl= $_SESSION['macl']; @@ -39,7 +39,7 @@ if (!isset($_SESSION['macl']) || (isset($_GET['reset']) && $_GET['reset'] == 1)) $output= $macl->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/acl.png'), _("ACL management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/acl.png'), _("ACL management")); diff --git a/gosa-core/plugins/admin/applications/main.inc b/gosa-core/plugins/admin/applications/main.inc index 2df737788..51011b31a 100644 --- a/gosa-core/plugins/admin/applications/main.inc +++ b/gosa-core/plugins/admin/applications/main.inc @@ -35,7 +35,7 @@ if ($remove_lock){ $output= $applicationManagement->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/application.png'), _("Application management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/application.png'), _("Application management")); diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc index 5db627873..76d816ccb 100644 --- a/gosa-core/plugins/admin/departments/main.inc +++ b/gosa-core/plugins/admin/departments/main.inc @@ -19,7 +19,7 @@ */ if ($remove_lock){ - if(isset($_SESSION['department'])){ + if(session::is_set('department')){ $department= $_SESSION['department']; $department->remove_lock(); del_lock ($ui->dn); @@ -27,7 +27,7 @@ if ($remove_lock){ } } else { /* Create usermanagement object on demand */ - if (!isset($_SESSION['department']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('department') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['department']= new departmentManagement($config, $ui); } $department= $_SESSION['department']; @@ -37,7 +37,7 @@ if ($remove_lock){ $output= $department->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/department.png'), _("Department management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/department.png'), _("Department management")); diff --git a/gosa-core/plugins/admin/devices/main.inc b/gosa-core/plugins/admin/devices/main.inc index 92f901dd3..e56937a62 100755 --- a/gosa-core/plugins/admin/devices/main.inc +++ b/gosa-core/plugins/admin/devices/main.inc @@ -38,7 +38,7 @@ if ($remove_lock){ $output= $DeviceManagement->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/devices.png'), _("Device management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/devices.png'), _("Device management")); diff --git a/gosa-core/plugins/admin/fai/main.inc b/gosa-core/plugins/admin/fai/main.inc index ab6749d44..edf3a59e3 100644 --- a/gosa-core/plugins/admin/fai/main.inc +++ b/gosa-core/plugins/admin/fai/main.inc @@ -42,7 +42,7 @@ if ($remove_lock){ sess_del ('FAI'); } /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation")); diff --git a/gosa-core/plugins/admin/groups/main.inc b/gosa-core/plugins/admin/groups/main.inc index 3a1210163..2f30e04b1 100644 --- a/gosa-core/plugins/admin/groups/main.inc +++ b/gosa-core/plugins/admin/groups/main.inc @@ -35,7 +35,7 @@ if ($remove_lock){ $output= $groupManagement->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/group.png'), _("Group administration"), "\"\" ". diff --git a/gosa-core/plugins/admin/mimetypes/main.inc b/gosa-core/plugins/admin/mimetypes/main.inc index 1595f185e..fb64f754f 100755 --- a/gosa-core/plugins/admin/mimetypes/main.inc +++ b/gosa-core/plugins/admin/mimetypes/main.inc @@ -38,7 +38,7 @@ if ($remove_lock){ $output= $MimeTypeManagement->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management")); diff --git a/gosa-core/plugins/admin/ogroups/main.inc b/gosa-core/plugins/admin/ogroups/main.inc index 79690779d..9d13b8cc0 100644 --- a/gosa-core/plugins/admin/ogroups/main.inc +++ b/gosa-core/plugins/admin/ogroups/main.inc @@ -20,7 +20,7 @@ if (!$remove_lock){ /* Create object object on demand */ - if (!isset($_SESSION['ogroup']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('ogroup') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['ogroup']= new ogroupManagement ($config); } $ogroup= $_SESSION['ogroup']; @@ -30,7 +30,7 @@ if (!$remove_lock){ $output= $ogroup->execute (); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/ogroup.png'), _("Object groups"), "\"\"remove_lock(); del_lock ($ui->dn); @@ -27,7 +27,7 @@ if ($remove_lock){ } } else { /* Create usermanagement object on demand */ - if (!isset($_SESSION['systems']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('systems') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['systems']= new systems($config, $ui); } $systems= $_SESSION['systems']; @@ -41,7 +41,7 @@ if ($remove_lock){ } /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/system.png'), _("System management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/system.png'), _("System management")); diff --git a/gosa-core/plugins/admin/users/main.inc b/gosa-core/plugins/admin/users/main.inc index d545835f7..b3a0a4251 100644 --- a/gosa-core/plugins/admin/users/main.inc +++ b/gosa-core/plugins/admin/users/main.inc @@ -37,7 +37,7 @@ if ($remove_lock){ $output= $userManagement->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/user.png'), _("User administration"), "\"\"dn); sess_del ('blocklist'); } } else { /* Create blocklist object on demand */ - if (!isset($_SESSION['blocklist']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('blocklist') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['blocklist']= new blocklist($config, $ui); $_SESSION['blocklist']->set_acl_category("gofaxlist"); } @@ -22,7 +22,7 @@ if ($remove_lock){ } /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management"), "\"\"align=\"middle\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management")); diff --git a/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc b/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc index 58bd75873..087ae83c8 100644 --- a/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -133,7 +133,7 @@ class gofaxAccount extends plugin } /* Edit mode specifies if we are editing from my accout */ - $edit_mode = (!is_object($this->parent) && !isset($_SESSION['edit'])); + $edit_mode = (!is_object($this->parent) && !session::is_set('edit')); /* Load smarty stuff */ $smarty= get_smarty(); @@ -697,7 +697,7 @@ class gofaxAccount extends plugin /* Save data to object */ function save_object() { - $edit_mode = (!is_object($this->parent) && !isset($_SESSION['edit'])); + $edit_mode = (!is_object($this->parent) && !session::is_set('edit')); if (isset($_POST['faxTab'])){ plugin::save_object(); diff --git a/gosa-core/plugins/gofax/faxaccount/main.inc b/gosa-core/plugins/gofax/faxaccount/main.inc index d2786d889..aa8393cc9 100644 --- a/gosa-core/plugins/gofax/faxaccount/main.inc +++ b/gosa-core/plugins/gofax/faxaccount/main.inc @@ -88,7 +88,7 @@ if (!$remove_lock){ $display.= "

\n"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " \n"; $display.= "\n"; diff --git a/gosa-core/plugins/gofax/faxreports/main.inc b/gosa-core/plugins/gofax/faxreports/main.inc index ac80ff340..61dd4cea0 100644 --- a/gosa-core/plugins/gofax/faxreports/main.inc +++ b/gosa-core/plugins/gofax/faxreports/main.inc @@ -2,7 +2,7 @@ if (!$remove_lock){ /* Create faxreport object on demand */ - if (!isset($_SESSION['faxreport']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('faxreport') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['faxreport']= new faxreport ($config, $ui); } $faxreport= $_SESSION['faxreport']; diff --git a/gosa-core/plugins/gofon/conference/main.inc b/gosa-core/plugins/gofon/conference/main.inc index d75fc78d9..0cc2451dd 100644 --- a/gosa-core/plugins/gofon/conference/main.inc +++ b/gosa-core/plugins/gofon/conference/main.inc @@ -19,7 +19,7 @@ */ if ($remove_lock){ - if(isset($_SESSION['conference'])){ + if(session::is_set('conference')){ $conference= $_SESSION['conference']; $conference->remove_lock(); del_lock ($ui->dn); @@ -27,7 +27,7 @@ if ($remove_lock){ } } else { /* Create usermanagement object on demand */ - if (!isset($_SESSION['conference']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('conference') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['conference']= new phoneConferenceManagment($config, $ui); } $conference= $_SESSION['conference']; @@ -35,7 +35,7 @@ if ($remove_lock){ $output= $conference->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header(get_template_path('images/conference.png'), _("Conference management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); } else { $display= print_header(get_template_path('images/conference.png'), _("Conference management")); diff --git a/gosa-core/plugins/gofon/fonreports/main.inc b/gosa-core/plugins/gofon/fonreports/main.inc index 5d1741db6..98b245346 100644 --- a/gosa-core/plugins/gofon/fonreports/main.inc +++ b/gosa-core/plugins/gofon/fonreports/main.inc @@ -2,7 +2,7 @@ if (!$remove_lock){ /* Create fonreport object on demand */ - if (!isset($_SESSION['fonreport']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('fonreport') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['fonreport']= new fonreport ($config, $ui); } $fonreport= $_SESSION['fonreport']; diff --git a/gosa-core/plugins/gofon/macro/main.inc b/gosa-core/plugins/gofon/macro/main.inc index f35e23b6f..36e0d65df 100755 --- a/gosa-core/plugins/gofon/macro/main.inc +++ b/gosa-core/plugins/gofon/macro/main.inc @@ -38,7 +38,7 @@ if ($remove_lock){ $output= $macroManagment->execute(); /* Page header*/ - if (isset($_SESSION['objectinfo'])){ + if (session::is_set('objectinfo')){ $display= print_header( get_template_path('images/macros.png'), _("Phone macro management"), "\"\" diff --git a/gosa-core/plugins/gofon/phoneaccount/class_phoneAccount.inc b/gosa-core/plugins/gofon/phoneaccount/class_phoneAccount.inc index 4cbb872fd..97bf0f27d 100644 --- a/gosa-core/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-core/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -805,7 +805,7 @@ class phoneAccount extends plugin } $display = ""; - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); if(empty($this->macro)&&(!empty($this->goFonMacro))){ /* Go through already saved values, for a parameter */ @@ -1092,7 +1092,7 @@ class phoneAccount extends plugin function save_object() { - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); if (isset($_POST["phoneTab"])){ plugin::save_object(); diff --git a/gosa-core/plugins/gofon/phoneaccount/main.inc b/gosa-core/plugins/gofon/phoneaccount/main.inc index 683057ad2..75ed8a9bc 100644 --- a/gosa-core/plugins/gofon/phoneaccount/main.inc +++ b/gosa-core/plugins/gofon/phoneaccount/main.inc @@ -100,7 +100,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/connectivity/class_connectivity.inc b/gosa-core/plugins/personal/connectivity/class_connectivity.inc index 8aa1836d6..5c2ad23a0 100644 --- a/gosa-core/plugins/personal/connectivity/class_connectivity.inc +++ b/gosa-core/plugins/personal/connectivity/class_connectivity.inc @@ -85,7 +85,7 @@ class connectivity extends plugin /* Execude objects */ $is_first= true; - $ReadOnly = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $ReadOnly = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); foreach ($this->plugin_name as $name){ $this->plugin[$name]->ReadOnly = $ReadOnly; diff --git a/gosa-core/plugins/personal/connectivity/main.inc b/gosa-core/plugins/personal/connectivity/main.inc index 14472f247..a1684f744 100644 --- a/gosa-core/plugins/personal/connectivity/main.inc +++ b/gosa-core/plugins/personal/connectivity/main.inc @@ -29,7 +29,7 @@ if (!$remove_lock){ } /* Create connectivity object on demand */ - if (!isset($_SESSION['connectivity']) || (isset($_GET['reset']) && + if (!session::is_set('connectivity') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['connectivity']= new connectivity ($config, $ui->dn); $_SESSION['connectivity']->enable_CSN_check(); @@ -53,7 +53,7 @@ if (!$remove_lock){ if (isset($_POST['edit'])){ /* Check locking */ - if ((($username= get_lock($ui->dn)) != "") && (!isset($_SESSION['edit']))){ + if ((($username= get_lock($ui->dn)) != "") && (!session::is_set('edit'))){ $_SESSION['back_plugin']= $plug; gen_locked_message ($username, $ui->dn); exit (); @@ -97,7 +97,7 @@ if (!$remove_lock){ $info= ""; $display.="

"; - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/environment/class_environment.inc b/gosa-core/plugins/personal/environment/class_environment.inc index 35a15daed..07f1ac750 100644 --- a/gosa-core/plugins/personal/environment/class_environment.inc +++ b/gosa-core/plugins/personal/environment/class_environment.inc @@ -320,7 +320,7 @@ class environment extends plugin } /* Are we editing from MyAccount and not editing a user */ - $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']); + $WriteOnly = (!isset($this->parent)|| !$this->parent) && !session::is_set('edit'); /* Check profile server */ if($this->acl_is_writeable("gotoProfileServer",$WriteOnly)){ @@ -1043,7 +1043,7 @@ class environment extends plugin /* Get all Posted vars * Setup checkboxes */ - $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']); + $WriteOnly = (!isset($this->parent)|| !$this->parent) && !session::is_set('edit'); if(isset($_POST['iamposted'])){ $PACL = $this->getacl("gotoProfileServer",$WriteOnly).$this->getacl("gotoProfileQuota",$WriteOnly); diff --git a/gosa-core/plugins/personal/environment/main.inc b/gosa-core/plugins/personal/environment/main.inc index 6b5d9366c..4cb24346f 100644 --- a/gosa-core/plugins/personal/environment/main.inc +++ b/gosa-core/plugins/personal/environment/main.inc @@ -28,7 +28,7 @@ if (!$remove_lock){ } /* Create mail object on demand */ - if (!isset($_SESSION['environment']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('environment') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['environment']= new environment ($config, $ui->dn); $_SESSION['environment']->enable_CSN_check(); $_SESSION['environment']->set_acl_category('users'); @@ -37,7 +37,7 @@ if (!$remove_lock){ $environment= $_SESSION['environment']; /* save changes back to object */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $environment->save_object (); } @@ -97,7 +97,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if ((isset($_SESSION['edit']))&&($environment->dialog===NULL)){ + if ((session::is_set('edit'))&&($environment->dialog===NULL)){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 57414ef0c..49a732cce 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -361,7 +361,7 @@ class user extends plugin } /* Remove picture? */ - if($this->acl_is_writeable("userPicture",(!is_object($this->parent) && !isset($_SESSION['edit']))) ){ + if($this->acl_is_writeable("userPicture",(!is_object($this->parent) && !session::is_set('edit'))) ){ if (isset($_POST['picture_remove'])){ $this->set_picture (); $this->jpegPhoto= "*removed*"; @@ -440,7 +440,7 @@ class user extends plugin /* Remove certificate? */ - if($this->acl_is_writeable("Certificate",(!is_object($this->parent) && !isset($_SESSION['edit'])))){ + if($this->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))){ foreach (array ("userCertificate", "userSMIMECertificate", "userPKCS12") as $val){ if (isset($_POST["remove_$val"])){ @@ -452,7 +452,7 @@ class user extends plugin } /* Upload new cert and close dialog? */ - if($this->acl_is_writeable("Certificate",(!is_object($this->parent) && !isset($_SESSION['edit'])))){ + if($this->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))){ if (isset($_POST['cert_edit_finish'])){ /* for all certificates do */ @@ -500,7 +500,7 @@ class user extends plugin /* Display cert dialog */ if ($this->cert_dialog){ - $smarty->assign("CertificateACL",$this->getacl("Certificate",(!is_object($this->parent) && !isset($_SESSION['edit'])))); + $smarty->assign("CertificateACL",$this->getacl("Certificate",(!is_object($this->parent) && !session::is_set('edit')))); $smarty->assign("Certificate_readable",$this->acl_is_readable("Certificate")); foreach(array("userCertificate", "userSMIMECertificate", "userPKCS12") as $cert){ @@ -580,17 +580,17 @@ class user extends plugin /* Set acls */ $tmp = $this->plinfo(); foreach($tmp['plProvidedAcls'] as $val => $translation){ - $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !isset($_SESSION['edit'])))); + $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !session::is_set('edit')))); } $smarty->assign("pwmode", $hashes); $smarty->assign("pwmode_select", $this->pw_storage); $smarty->assign("pw_configurable", $is_configurable); - $smarty->assign("passwordStorageACL", $this->getacl("userPassword",(!is_object($this->parent) && !isset($_SESSION['edit'])))); + $smarty->assign("passwordStorageACL", $this->getacl("userPassword",(!is_object($this->parent) && !session::is_set('edit')))); $smarty->assign("base_select", $this->base); - $smarty->assign("CertificatesACL", $this->getacl("Certificate",(!is_object($this->parent) && !isset($_SESSION['edit'])))); - $smarty->assign("userPictureACL", $this->getacl("userPicture",(!is_object($this->parent) && !isset($_SESSION['edit'])))); - $smarty->assign("userPicture_is_readable", $this->acl_is_readable("userPicture",(!is_object($this->parent) && !isset($_SESSION['edit'])))); + $smarty->assign("CertificatesACL", $this->getacl("Certificate",(!is_object($this->parent) && !session::is_set('edit')))); + $smarty->assign("userPictureACL", $this->getacl("userPicture",(!is_object($this->parent) && !session::is_set('edit')))); + $smarty->assign("userPicture_is_readable", $this->acl_is_readable("userPicture",(!is_object($this->parent) && !session::is_set('edit')))); /* Create base acls */ $tmp = @$this->allowedBasesToMoveTo(); @@ -605,14 +605,14 @@ class user extends plugin $smarty->assign("ivbbmodes", $ivbbmodes); foreach ($this->govattrs as $val){ $smarty->assign("$val", $this->$val); - $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !isset($_SESSION['edit'])))); + $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !session::is_set('edit')))); } } else { $smarty->assign("governmentmode", "false"); } /* Special mode for uid */ - $uidACL= $this->getacl("uid",(!is_object($this->parent) && !isset($_SESSION['edit']))); + $uidACL= $this->getacl("uid",(!is_object($this->parent) && !session::is_set('edit'))); if (isset ($this->dn)){ if ($this->dn != "new"){ $uidACL= preg_replace("/w/","",$uidACL); @@ -706,7 +706,7 @@ class user extends plugin /* Save government mode attributes */ if ($this->config->current['GOVERNMENTMODE']){ foreach ($this->govattrs as $val){ - if ($this->acl_is_writeable($val,(!is_object($this->parent) && !isset($_SESSION['edit']))) && isset($_POST["$val"])){ + if ($this->acl_is_writeable($val,(!is_object($this->parent) && !session::is_set('edit'))) && isset($_POST["$val"])){ $data= stripcslashes($_POST["$val"]); if ($data != $this->$val){ $this->is_modified= TRUE; @@ -1258,7 +1258,7 @@ class user extends plugin /* Load certificate from file to object */ function set_cert($cert, $filename) { - if(!$thsi->acl_is_writeable("Certificate",(!is_object($this->parent) && !isset($_SESSION['edit'])))) return; + if(!$thsi->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))) return; $fd = fopen ($filename, "rb"); if (filesize($filename)>0) { $this->$cert= fread ($fd, filesize ($filename)); diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc index e35ee1eed..68c98d85c 100644 --- a/gosa-core/plugins/personal/generic/main.inc +++ b/gosa-core/plugins/personal/generic/main.inc @@ -32,7 +32,7 @@ if (!$remove_lock){ } /* Create user object on demand */ - if (!isset($_SESSION['user']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('user') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['user']= new user ($config, $ui->dn); $_SESSION['user']->enable_CSN_check(); $_SESSION['user']->set_acl_base($ui->dn); @@ -154,7 +154,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/mail/class_mailAccount.inc b/gosa-core/plugins/personal/mail/class_mailAccount.inc index f123d3825..d4d768160 100644 --- a/gosa-core/plugins/personal/mail/class_mailAccount.inc +++ b/gosa-core/plugins/personal/mail/class_mailAccount.inc @@ -522,7 +522,7 @@ class mailAccount extends plugin /* Display mail account tab */ $smarty->assign("mailServers", $mailserver); - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); $tmp = $this->plInfo(); foreach($tmp['plProvidedAcls'] as $name => $transl){ diff --git a/gosa-core/plugins/personal/mail/main.inc b/gosa-core/plugins/personal/mail/main.inc index dda8cd770..a247e9e5a 100644 --- a/gosa-core/plugins/personal/mail/main.inc +++ b/gosa-core/plugins/personal/mail/main.inc @@ -99,7 +99,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/nagios/class_nagiosAccount.inc b/gosa-core/plugins/personal/nagios/class_nagiosAccount.inc index 41b2de34c..66625e213 100644 --- a/gosa-core/plugins/personal/nagios/class_nagiosAccount.inc +++ b/gosa-core/plugins/personal/nagios/class_nagiosAccount.inc @@ -126,7 +126,7 @@ class nagiosAccount extends plugin /* Assign acls */ $tmp = $this->plInfo(); - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); foreach($tmp['plProvidedAcls'] as $acl => $desc){ $smarty->assign($acl."ACL",$this->getacl($acl,$SkipWrite)); } diff --git a/gosa-core/plugins/personal/nagios/main.inc b/gosa-core/plugins/personal/nagios/main.inc index c6a61b3b9..feb399ed1 100644 --- a/gosa-core/plugins/personal/nagios/main.inc +++ b/gosa-core/plugins/personal/nagios/main.inc @@ -100,7 +100,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/netatalk/class_netatalk.inc b/gosa-core/plugins/personal/netatalk/class_netatalk.inc index 3693fda79..919e4f2dc 100644 --- a/gosa-core/plugins/personal/netatalk/class_netatalk.inc +++ b/gosa-core/plugins/personal/netatalk/class_netatalk.inc @@ -200,7 +200,7 @@ class netatalk extends plugin { } /* Assign attributes and ACL to smarty */ - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); $smarty->assign("netatalkShareACL", $this->getacl("netatalkShare",$SkipWrite)); $smarty->assign("netatalkUserHomepathACL", $this->getacl("netatalkUserHomepath",$SkipWrite)); diff --git a/gosa-core/plugins/personal/password/main.inc b/gosa-core/plugins/personal/password/main.inc index b8135bc6a..bbc68fb02 100644 --- a/gosa-core/plugins/personal/password/main.inc +++ b/gosa-core/plugins/personal/password/main.inc @@ -33,7 +33,7 @@ if (!$remove_lock){ } /* Create password object on demand */ - if (!isset($_SESSION['password']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('password') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['password']= new password ($config, $ui->dn); } $password= $_SESSION['password']; diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc index 438fa4147..4eb7a3344 100644 --- a/gosa-core/plugins/personal/posix/class_posixAccount.inc +++ b/gosa-core/plugins/personal/posix/class_posixAccount.inc @@ -438,7 +438,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) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); /* Depending on pwmode, currently hardcoded because there are no other methods */ if ( 1 == 1 ){ diff --git a/gosa-core/plugins/personal/posix/main.inc b/gosa-core/plugins/personal/posix/main.inc index 31994ef3f..560bc0416 100644 --- a/gosa-core/plugins/personal/posix/main.inc +++ b/gosa-core/plugins/personal/posix/main.inc @@ -45,7 +45,7 @@ if (!$remove_lock){ } /* Enter edit mode? */ - if ((isset($_POST['edit'])) && (!isset($_SESSION['edit']))){ + if ((isset($_POST['edit'])) && (!session::is_set('edit'))){ /* Check locking */ if (($username= get_lock($ui->dn)) != ""){ @@ -101,7 +101,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc index ac2bcb711..bb814dad4 100644 --- a/gosa-core/plugins/personal/samba/class_sambaAccount.inc +++ b/gosa-core/plugins/personal/samba/class_sambaAccount.inc @@ -248,7 +248,7 @@ class sambaAccount extends plugin } } - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); /* Open Samaba Logong hours dialog */ if(isset($_POST['SetSambaLogonHours']) && $this->samba3 && $this->acl_is_writeable("sambaLogonHours")){ @@ -778,7 +778,7 @@ class sambaAccount extends plugin function save_object() { - $SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']); + $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); /* We only care if we are on the sambaTab... */ if (isset($_POST['sambaTab'])){ diff --git a/gosa-core/plugins/personal/samba/main.inc b/gosa-core/plugins/personal/samba/main.inc index 0c198dc3e..934c24237 100644 --- a/gosa-core/plugins/personal/samba/main.inc +++ b/gosa-core/plugins/personal/samba/main.inc @@ -99,7 +99,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n"; diff --git a/gosa-core/plugins/personal/scalix/main.inc b/gosa-core/plugins/personal/scalix/main.inc index 0d2558a8a..c086e8d7d 100644 --- a/gosa-core/plugins/personal/scalix/main.inc +++ b/gosa-core/plugins/personal/scalix/main.inc @@ -96,7 +96,7 @@ if (!$remove_lock){ $display.= "

"; /* Are we in edit mode? */ - if (isset($_SESSION['edit'])){ + if (session::is_set('edit')){ $display.= "\n"; $display.= " "; $display.= "\n";