Code

Modified all session calls of this type
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jan 2008 06:50:37 +0000 (06:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jan 2008 06:50:37 +0000 (06:50 +0000)
 isset($_SESSION['...'])
to
 session::is_set('...')

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8201 594d385d-05f5-0310-b6e9-bd551577e9d8

42 files changed:
gosa-core/html/main.php
gosa-core/plugins/addons/godfs/main.inc
gosa-core/plugins/addons/gotomasses/main.inc
gosa-core/plugins/addons/ldapmanager/main.inc
gosa-core/plugins/addons/mailqueue/main.inc
gosa-core/plugins/addons/notifications/main.inc
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/applications/main.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/devices/main.inc
gosa-core/plugins/admin/fai/main.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/mimetypes/main.inc
gosa-core/plugins/admin/ogroups/main.inc
gosa-core/plugins/admin/systems/main.inc
gosa-core/plugins/admin/users/main.inc
gosa-core/plugins/gofax/blocklists/main.inc
gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc
gosa-core/plugins/gofax/faxaccount/main.inc
gosa-core/plugins/gofax/faxreports/main.inc
gosa-core/plugins/gofon/conference/main.inc
gosa-core/plugins/gofon/fonreports/main.inc
gosa-core/plugins/gofon/macro/main.inc
gosa-core/plugins/gofon/phoneaccount/class_phoneAccount.inc
gosa-core/plugins/gofon/phoneaccount/main.inc
gosa-core/plugins/personal/connectivity/class_connectivity.inc
gosa-core/plugins/personal/connectivity/main.inc
gosa-core/plugins/personal/environment/class_environment.inc
gosa-core/plugins/personal/environment/main.inc
gosa-core/plugins/personal/generic/class_user.inc
gosa-core/plugins/personal/generic/main.inc
gosa-core/plugins/personal/mail/class_mailAccount.inc
gosa-core/plugins/personal/mail/main.inc
gosa-core/plugins/personal/nagios/class_nagiosAccount.inc
gosa-core/plugins/personal/nagios/main.inc
gosa-core/plugins/personal/netatalk/class_netatalk.inc
gosa-core/plugins/personal/password/main.inc
gosa-core/plugins/personal/posix/class_posixAccount.inc
gosa-core/plugins/personal/posix/main.inc
gosa-core/plugins/personal/samba/class_sambaAccount.inc
gosa-core/plugins/personal/samba/main.inc
gosa-core/plugins/personal/scalix/main.inc

index d604d994b0992c797cd7e5462107d08e6e9289ea..c1c504d5255e3573db4091ef8fbc2a46635147bf 100644 (file)
@@ -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));
 }
 
index 56fc3c0e4537a38e3d196d30ae161aee4b51f2ea..433f9be92fdf44e77ac3c545efe3d2f2f960fd1d 100644 (file)
@@ -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"),
                                 "<img alt=\"\" class=\"center\" src=\"".
index abe913f4b50eefd693acf3f73913ea86419dddaf..2de0445728c7141a87b435c59487ea17a1f7c210 100644 (file)
@@ -21,7 +21,7 @@
 if (!$remove_lock){
 
        /* Create gotomasses object on demand */
-       if (!isset($_SESSION['gotomasses']) || (isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['reload_gotomass_data'])){
+       if (!session::is_set('gotomasses') || (isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['reload_gotomass_data'])){
                $_SESSION['gotomasses']= new gotomasses ($config);
                $_SESSION['gotomasses']->set_acl_category("gotomasses");
 
index 696c14add98996662b90b6368c40cb02a6de1fe7..f2955a35ca3d46717648b77404fe1643d780cebb 100644 (file)
@@ -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");
        }
index 09bbe568c0a21efa8e5be070397fa64ae66ccd66..37dca88c24dbf73f2dc515e6042fcff7ca862903 100644 (file)
@@ -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");
index c73698541f92c3f830c54e70ba1024c932a0ff1b..6d7245c7505708b6e50f8b328c365994a98d130b 100644 (file)
@@ -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");
index bea89a962e18dd08e508973c2d4aeb18bbf57212..914817c8ec0858a65c7fcaa8f4800c870777d959 100644 (file)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/acl.png'), _("ACL management"));
index 2df737788e21637da240100937b4105ad09324e3..51011b31a37e88971ecfcbf2a9625d053a3f6373 100644 (file)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/application.png'), _("Application management"));
index 5db627873ebe0dfa0a7b684d204147f52c2ae90f..76d816ccb9750d1767d38f2873e96010f5c7c8f6 100644 (file)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/department.png'), _("Department management"));
index 92f901dd3a75fadb9c45e87cd2483331889d875a..e56937a628d1762b5ba07a58f2822097a731da55 100755 (executable)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
                } else {
                                $display= print_header(get_template_path('images/devices.png'), _("Device management"));
index ab6749d44c02d515ce2f7e6334c408590f39e09d..edf3a59e3c0b3054c577811c2ccf8095029a7501 100644 (file)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"));
index 3a12101639059f7144440501bc859d5cc743d6c0..2f30e04b16b24352bf30a2d8dce5d8084012f3ed 100644 (file)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".
                             get_template_path('images/closedlock.png')."\"> ".
index 1595f185e86ff1f82469511171011ca7c8e2b677..fb64f754f1d41df28f95d661954881410e1410a2 100755 (executable)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
                } else {
                                $display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management"));
index 79690779d0b9e7c47cc4923e2322961c5eda1930..9d13b8cc0e4146a44a474203e1a483abfa26da26 100644 (file)
@@ -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"),
                           "<img alt=\"\" align=\"middle\" src=\"".
index f9bd8fb9c6ba5e0fc779713e838958338a94123b..a129e719642190ad8b27da5e23ccb3ef71a2cadf 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 if ($remove_lock){
-        if(isset($_SESSION['systems'])){
+        if(session::is_set('systems')){
                 $systems= $_SESSION['systems'];
                 $systems->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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/system.png'), _("System management"));
index d545835f7cc0355122f67a8573b96802669c0e5d..b3a0a4251b6d2b8c489645fca2e0703ab3498896 100644 (file)
@@ -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"),
                            "<img alt=\"\" class=\"center\" src=\"".
index 71c0b81a36e0942401a2c00f8b6af48cda1526b4..5951a6307bc28cf7ace1ed0eabef5d77566fe36f 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 if ($remove_lock){
-        if(isset($_SESSION['blocklist'])){
+        if(session::is_set('blocklist')){
                 $blocklist= $_SESSION['blocklist'];
                 del_lock ($ui->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"), "<img alt=\"\"align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management"));
index 58bd758737ce25429a9f1175c32faf5d0948e015..087ae83c8a36ad924f4803d9b27dd4bd2a657820 100644 (file)
@@ -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();
 
index d2786d889e0c390db926fb9dfbe0d12f7872f576..aa8393cc9b2249fe830ddd92c8c943679de768d1 100644 (file)
@@ -88,7 +88,7 @@ if (!$remove_lock){
                $display.= "<p class=\"plugbottom\">\n";
 
                /* Are we in edit mode? */
-               if (isset($_SESSION['edit'])){
+               if (session::is_set('edit')){
                        $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
                        $display.= "&nbsp;\n";
                        $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index ac80ff34095ec05981b43ddb293150aec1a6a84f..61dd4cea05a975e9688b7b1171a9c6330f313ec0 100644 (file)
@@ -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'];
index d75fc78d9b9d513948f45d14467fc5006ff56d95..0cc2451dd9f7e594700ad20d6751ecc07e983523 100644 (file)
@@ -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"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".@LDAP::fix($_SESSION['objectinfo']));
        } else {
                $display= print_header(get_template_path('images/conference.png'), _("Conference management"));
index 5d1741db644db15c272567cdddfd9347c878173f..98b245346ba2a96affdc88525dca3a89609f5fbc 100644 (file)
@@ -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'];
index f35e23b6f5cfa856392575240db40012d90711d1..36e0d65df41a8d76ce703302518c37d6bee57976 100755 (executable)
@@ -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"), 
                             "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> 
index 4cbb872fd9d884c3fe25e0749debd7c2e13693a7..97bf0f27dc475b77030f48f210fa6e6e8c87fee0 100644 (file)
@@ -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();
index 683057ad2b77b2bf7c5d6fa6525f2c753804c275..75ed8a9bcaf5c1b94f3a496cf4b054f7c59d6486 100644 (file)
@@ -100,7 +100,7 @@ if (!$remove_lock){
                $display.= "<p class=\"plugbottom\">";
 
                /* Are we in edit mode? */
-               if (isset($_SESSION['edit'])){
+               if (session::is_set('edit')){
                        $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
                        $display.= "&nbsp;";
                        $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 8aa1836d6d8eb584cde33e1e7762b8e2449202a1..5c2ad23a0091d5e2e3b70962933ff73005b28078 100644 (file)
@@ -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;
index 14472f247da4e5d32876b0799a7f7f4043aebd5a..a1684f74472fdbe154caf7ad8cedad80ea178403 100644 (file)
@@ -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.="<div align='right'>";
-  if (isset($_SESSION['edit'])){
+  if (session::is_set('edit')){
     $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
     $display.= "&nbsp;";
     $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 35a15daed1a303d8bdd15049d3a8445bd1657fc8..07f1ac7509e2f6717863a0cd19e1de3c7fd258a6 100644 (file)
@@ -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);
index 6b5d9366cfee3a0d812cb3720df0e9a7f1d03677..4cb24346f7fe1dfe91aa7f3bd31d71d7f1b61ff1 100644 (file)
@@ -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.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if ((isset($_SESSION['edit']))&&($environment->dialog===NULL)){
+    if ((session::is_set('edit'))&&($environment->dialog===NULL)){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 57414ef0ca59bf90f1b9d957e6b8a0ae811d5f31..49a732cce2e1cc1ade56f9fde15e6d24d9b59074 100644 (file)
@@ -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));
index e35ee1eed79daef80919a774d893e330e3da5e77..68c98d85c2ecd4cabe39496bbc2f820d4459f4ca 100644 (file)
@@ -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.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset($_SESSION['edit'])){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index f123d38257dc3e099be60d61cd3815723a7d983c..d4d7681608d808b46f4dd70bf640d1bf38e9cce2 100644 (file)
@@ -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){
index dda8cd7706bdf8925f10b409aeb3b6d2a8a32fcc..a247e9e5a07d4f0b8eb9bad2bc4c7f7effe43f99 100644 (file)
@@ -99,7 +99,7 @@ if (!$remove_lock){
     $display.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset($_SESSION['edit'])){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 41b2de34c6a638b1c889ea7d12b1b5c92c1c6da7..66625e213e24793d91e537d8c9bda2c340249bcf 100644 (file)
@@ -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));
     }
index c6a61b3b98a320752ffb7a648ac1579c74efd060..feb399ed17b2615525f65adc5b574398af1c5fbc 100644 (file)
@@ -100,7 +100,7 @@ if (!$remove_lock){
     $display.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset($_SESSION['edit'])){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 3693fda79f3ed68652febad185966cee8b28eac7..919e4f2dc8374924f0ae6ed62457858d8382a9c9 100644 (file)
@@ -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));
 
index b8135bc6a271dbc69fe6da47a39080380cd4e763..bbc68fb0289626729b64baab24fadd770805231c 100644 (file)
@@ -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'];
index 438fa41475a9302f0ee2e1d5752d2d37dfbf39b9..4eb7a33442bf87bc00be34539a7c0069ff1628ad 100644 (file)
@@ -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 ){
index 31994ef3f13f9a615fd1258d461b210f808709ac..560bc04161b077cc5282ce503e969dc5b748441a 100644 (file)
@@ -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.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset($_SESSION['edit'])){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index ac2bcb711cd41e0eda43d8416a1b1e482e6faa55..bb814dad4822221ffc09d93d95d29e2c90eb46d5 100644 (file)
@@ -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'])){
index 0c198dc3e54667e316c11ea791ffe2e0823a0722..934c242379703230d8b2764cf6d27e60f2b959a4 100644 (file)
@@ -99,7 +99,7 @@ if (!$remove_lock){
     $display.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset($_SESSION['edit'])){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
index 0d2558a8a67d91c6ed4cd6de65387137956df2bf..c086e8d7d520fffc76f4dfe70f0dd6e49f56e434 100644 (file)
@@ -96,7 +96,7 @@ if (!$remove_lock){
     $display.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if (isset($_SESSION['edit'])){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" value=\""._("Save")."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";