From: hickert Date: Fri, 4 Jan 2008 10:11:49 +0000 (+0000) Subject: Some session fixes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a7cf1f8c18a11db03b83298543490e280136e855;p=gosa.git Some session fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8213 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/fai/class_askClassName.inc b/gosa-core/plugins/admin/fai/class_askClassName.inc index de9c2a534..c7e38adb5 100644 --- a/gosa-core/plugins/admin/fai/class_askClassName.inc +++ b/gosa-core/plugins/admin/fai/class_askClassName.inc @@ -45,7 +45,7 @@ class askClassName extends plugin * With a second search detect all object that belong to the different ous. */ - $base = get_ou('faiou').$_SESSION['CurrentMainBase']; + $base = get_ou('faiou').session::get('CurrentMainBase'); if($faifilter['branch'] != "main"){ $base = $faifilter['branch']; } diff --git a/gosa-core/plugins/admin/fai/class_divListFai.inc b/gosa-core/plugins/admin/fai/class_divListFai.inc index 5399a29f1..f8977130e 100644 --- a/gosa-core/plugins/admin/fai/class_divListFai.inc +++ b/gosa-core/plugins/admin/fai/class_divListFai.inc @@ -412,7 +412,9 @@ class divListFai extends MultiSelectWindow { /* Save automatic created POSTs like regex, checkboxes */ MultiSelectWindow::save_object(); - $_SESSION['faifilter']['branch'] = $this->selectedBranch; + $faifilter = session::get('faifilter'); + $faifilter['branch'] = $this->selectedBranch; + session::set('faifilter',$faifilter); } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/admin/fai/main.inc b/gosa-core/plugins/admin/fai/main.inc index fb54bdfcd..23ef50cd6 100644 --- a/gosa-core/plugins/admin/fai/main.inc +++ b/gosa-core/plugins/admin/fai/main.inc @@ -28,9 +28,10 @@ if ($remove_lock){ } else { /* Create usermanagement object on demand */ if (!session::is_set('FAI') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ - $_SESSION['FAI']= new faiManagement($config, $ui); - $_SESSION['FAI']->set_acl_category("fai"); - $_SESSION['FAI']->set_acl_base(session::get('CurrentMainBase')); + $FAI= new faiManagement($config, $ui); + $FAI->set_acl_category("fai"); + $FAI->set_acl_base(session::get('CurrentMainBase')); + session::set('FAI',$FAI); } $FAI = session::get('FAI'); $FAI->save_object(); diff --git a/gosa-core/plugins/admin/fai/tabsHook.inc b/gosa-core/plugins/admin/fai/tabsHook.inc index d431eea1e..ed61e1fc8 100644 --- a/gosa-core/plugins/admin/fai/tabsHook.inc +++ b/gosa-core/plugins/admin/fai/tabsHook.inc @@ -21,10 +21,10 @@ class tabsHook extends tabs { $baseobject= $this->by_object['faiHook']; - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faihookou').get_ou('faiou').$_SESSION['CurrentMainBase']; - - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faihookou').$_SESSION['faifilter']['branch']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faihookou').get_ou('faiou').session::get('CurrentMainBase'); + $faifilter = session::get('faifilter'); + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faihookou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/fai/tabsPackage.inc b/gosa-core/plugins/admin/fai/tabsPackage.inc index 6a3d58158..e678a835e 100644 --- a/gosa-core/plugins/admin/fai/tabsPackage.inc +++ b/gosa-core/plugins/admin/fai/tabsPackage.inc @@ -22,9 +22,12 @@ class tabsPackage extends tabs { $baseobject= $this->by_object['faiPackage']; - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipackageou').get_ou('faiou').$_SESSION['CurrentMainBase']; - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faipackageou').$_SESSION['faifilter']['branch']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipackageou').get_ou('faiou').session::get('CurrentMainBase'); + + $faifilter = session::get('faifilter'); + + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faipackageou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/fai/tabsPartition.inc b/gosa-core/plugins/admin/fai/tabsPartition.inc index 56bd1d2f4..308d50b8a 100644 --- a/gosa-core/plugins/admin/fai/tabsPartition.inc +++ b/gosa-core/plugins/admin/fai/tabsPartition.inc @@ -22,10 +22,11 @@ class tabsPartition extends tabs { $baseobject= $this->by_object['faiPartitionTable']; - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipartitionou').get_ou('faiou').$_SESSION['CurrentMainBase']; - - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faipartitionou').$_SESSION['faifilter']['branch']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipartitionou').get_ou('faiou').session::get('CurrentMainBase'); + + $faifilter = session::get('faifilter'); + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faipartitionou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/fai/tabsProfile.inc b/gosa-core/plugins/admin/fai/tabsProfile.inc index 3480b46af..ccac199c2 100644 --- a/gosa-core/plugins/admin/fai/tabsProfile.inc +++ b/gosa-core/plugins/admin/fai/tabsProfile.inc @@ -22,10 +22,11 @@ class tabsProfile extends tabs { $baseobject= $this->by_object['faiProfile']; - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faiprofileou').get_ou('faiou').$_SESSION['CurrentMainBase']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faiprofileou').get_ou('faiou').session::get('CurrentMainBase'); - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiprofileou').$_SESSION['faifilter']['branch']; + $faifilter = session::get('faifilter'); + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faiprofileou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/fai/tabsScript.inc b/gosa-core/plugins/admin/fai/tabsScript.inc index 1eac83c38..094fbb405 100644 --- a/gosa-core/plugins/admin/fai/tabsScript.inc +++ b/gosa-core/plugins/admin/fai/tabsScript.inc @@ -22,10 +22,12 @@ class tabsScript extends tabs { $baseobject= $this->by_object['faiScript']; - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faiscriptou').get_ou('faiou').$_SESSION['CurrentMainBase']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faiscriptou').get_ou('faiou').session::get('CurrentMainBase'); - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiscriptou').$_SESSION['faifilter']['branch']; + $faifilter = session::get('faifilter'); + + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faiscriptou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/fai/tabsTemplate.inc b/gosa-core/plugins/admin/fai/tabsTemplate.inc index eb674e894..5f7f8ab4c 100644 --- a/gosa-core/plugins/admin/fai/tabsTemplate.inc +++ b/gosa-core/plugins/admin/fai/tabsTemplate.inc @@ -21,11 +21,12 @@ class tabsTemplate extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiTemplate']; - - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faitemplateou').get_ou('faiou').$_SESSION['CurrentMainBase']; - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faitemplateou').$_SESSION['faifilter']['branch']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faitemplateou').get_ou('faiou').session::get('CurrentMainBase'); + + $faifilter = session::get('faifilter'); + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faitemplateou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/fai/tabsVariable.inc b/gosa-core/plugins/admin/fai/tabsVariable.inc index 2958a11f5..11694b1d1 100644 --- a/gosa-core/plugins/admin/fai/tabsVariable.inc +++ b/gosa-core/plugins/admin/fai/tabsVariable.inc @@ -22,10 +22,12 @@ class tabsVariable extends tabs { $baseobject= $this->by_object['faiVariable']; - $new_dn= 'cn='.$baseobject->cn.",".get_ou('faivariableou').get_ou('faiou').$_SESSION['CurrentMainBase']; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('faivariableou').get_ou('faiou').session::get('CurrentMainBase'); + + $faifilter = session::get('faifilter'); - if($_SESSION['faifilter']['branch']!="main"){ - $new_dn ='cn='.$baseobject->cn.",".get_ou('faivariableou').$_SESSION['faifilter']['branch']; + if($faifilter['branch']!="main"){ + $new_dn ='cn='.$baseobject->cn.",".get_ou('faivariableou').$faifilter['branch']; } if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-core/plugins/admin/systems/class_workstationService.inc b/gosa-core/plugins/admin/systems/class_workstationService.inc index 526b9cc17..5b1a43e1a 100644 --- a/gosa-core/plugins/admin/systems/class_workstationService.inc +++ b/gosa-core/plugins/admin/systems/class_workstationService.inc @@ -222,7 +222,7 @@ class workservice extends plugin } /* Workaround to fill in inherited values if we've specified an objectclass */ - $SelectedSystemType = $SelectedSystemType; + $SelectedSystemType = session::get("SelectedSystemType"); if (isset($SelectedSystemType['ogroup']) && $SelectedSystemType['ogroup'] != 'none'){ $this->XResolutions= array('default' => _("inherited")); $this->XColordepths= array('default' => _("inherited"));