summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c91d6f)
raw | patch | inline | side by side (parent: 3c91d6f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Jan 2008 11:08:36 +0000 (11:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Jan 2008 11:08:36 +0000 (11:08 +0000) |
Session calls will now be done via class_session
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8217 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8217 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/fai/class_faiHook.inc b/gosa-core/plugins/admin/fai/class_faiHook.inc
index 7e6b1c70517fdddda21aa7e26f59b67a23135328..49b49fb74800082d32d7a8277ac2b2b86b09a0f1 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $faifilter = session::get('faifilter');
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']);
+ if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
prepare_to_save_FAI_object($use_dn,array(),true);
diff --git a/gosa-core/plugins/admin/fai/class_faiManagement.inc b/gosa-core/plugins/admin/fai/class_faiManagement.inc
index 07189b177ee2ffbaf75f6d1eb47e2dc9d0b219da..16ae87f73f1bf39cb4424b83803e5c2ac06afb1f 100644 (file)
}
if($is_ok){
- $_SESSION['LASTPOST']['base'] = $base;
- $_SESSION['LASTPOST']['type'] = $type;
+
+ if(session::is_set('LASTPOST')){
+ $LASTPOST = session::get('LASTPOST');
+ }else{
+ $LASTPOST = array();
+ }
+ $LASTPOST['base'] = $base;
+ $LASTPOST['type'] = $type;
+ session::set('LASTPOST',$LASTPOST);
$smarty->assign("iframe", true);
$smarty->assign("plugID", $_GET['plug']);
$display = $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
/* Create it know */
$this->dispNewBranch = false;
$this->dispNewFreeze = false;
- $base = $_SESSION['LASTPOST']['base'];
+
+ $LASTPOST = session::get('LASTPOST');
+ $base = $LASTPOST['base'];
$_POST = session::get('LASTPOST');
$name = $_POST['BranchName'];
- $type = $_SESSION['LASTPOST']['type'];
+ $type = $LASTPOST['type'];
$ldap = $this->config->get_ldap_link();
$baseToUse = $base;
diff --git a/gosa-core/plugins/admin/fai/class_faiPackage.inc b/gosa-core/plugins/admin/fai/class_faiPackage.inc
index c3a3fe971010101226f2978a335534c882ce3009..cd591d1fdbc364338fc40d8f4f86296ea9597c2a 100644 (file)
if(!$this->is_account){
/* Assemble release name */
- $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $_SESSION['faifilter']['branch']);
+ $faifilter = session::get('faifilter');
+ $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $faifilter['branch']);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(split(',', $tmp));
$this->FAIdebianRelease= "";
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
foreach($this->ConfiguredPackages as $pkgname => $attrs){
foreach($attrs as $name => $attr){
$pkgdn = "FAIvariable=".$name.",".$this->dn;
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $pkgdn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $pkgdn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $pkgdn);
+ if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
prepare_to_save_FAI_object($use_dn,array(),true);
/* Assemble release name */
if($this->FAIdebianRelease == "ClearFromCopyPaste"){
- $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $_SESSION['faifilter']['branch']);
+ $faifilter = session::get('faifilter');
+ $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $faifilter['branch']);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(split(',', $tmp));
$this->FAIdebianRelease= "";
diff --git a/gosa-core/plugins/admin/fai/class_faiPartitionTable.inc b/gosa-core/plugins/admin/fai/class_faiPartitionTable.inc
index 960b73e02b4b6c2e8247c8e4ff2fa3b3523537e1..f75117cd2f7876bc0c46f78fc4852f8fb8218485 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $faifilter = session::get('faifilter');
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
foreach($this->disks as $disk){
$disk_dn = "cn=".$disk['cn'].",".$this->dn;
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $disk_dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $disk_dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $disk_dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $disk_dn;
}
prepare_to_save_FAI_object($use_dn,array(),true);
foreach($disk['partitions'] as $key => $partition){
$partition_dn= "FAIpartitionNr=".$partition['FAIpartitionNr'].",".$disk_dn;
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $partition_dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $partition_dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $partition_dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $disk_dn;
}
prepare_to_save_FAI_object($use_dn,array(),true);
diff --git a/gosa-core/plugins/admin/fai/class_faiProfile.inc b/gosa-core/plugins/admin/fai/class_faiProfile.inc
index 048e29348efd191c88c7a8bf6458e3a0e01924ca..a2f86663d42210a6e924f202121571b147ac3f1d 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $faifilter = session::get('faifilter');
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
}
$ldap = $this->config->get_ldap_link();
-
- $base = $_SESSION['faifilter']['branch'];
+ $faifilter = session::get('faifilter');
+ $base = $faifilter['branch'];
if($base == "main"){
$base = session::get('CurrentMainBase');
}
diff --git a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc
index f0fe7f06ad15de1ec45416875e51307e713e6daa..3b51823b6dc4e615948308e5d694f4af808f1c00 100644 (file)
plugin::plugin ($config, $dn);
/* Search only in fai tree */
- $base = get_ou('faiou').$_SESSION['CurrentMainBase'];
- if($_SESSION['faifilter']['branch']!="main"){
- $base = $_SESSION['faifilter']['branch'];
+ $base = get_ou('faiou').session::get('CurrentMainBase');
+ $faifilter = session::get('faifilter');
+ if($faifilter['branch']!="main"){
+ $base = $faifilter['branch'];
}
$this->ui = get_userinfo();
/* If no search filter is set, create one */
if (!is_global("SUBfaifilter")){
- $SUBfaifilter= array("base" => get_ou('faiou').$_SESSION['CurrentMainBase'], "Sregex" => "*");
+ $SUBfaifilter= array("base" => get_ou('faiou').session::get('CurrentMainBase'), "Sregex" => "*");
$SUBfaifilter['SShowTemplates'] = true;
$SUBfaifilter['SShowScripts'] = true;
$SUBfaifilter['SShowHooks'] = true;
diff --git a/gosa-core/plugins/admin/fai/class_faiScript.inc b/gosa-core/plugins/admin/fai/class_faiScript.inc
index b5310e40ebffb04f13cc1ddc1ab0e48f7dcfdb52..33101d560f90e3f196afb6ed7cf013025d0ae66c 100644 (file)
{
if($dn == "new"){
if($this->dn == "new"){
- $dn= "cn=dummy,".$_SESSION['CurrentMainBase'];
+ $dn= "cn=dummy,".session::get('CurrentMainBase');
}else{
$dn = $this->dn;
}
if($this->acl_is_removeable()){
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
-
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $faifilter = session::get('faifilter');
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
prepare_to_save_FAI_object($use_dn,array(),true);
foreach($this->SubObjects as $name => $obj){
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']);
+ if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
prepare_to_save_FAI_object($use_dn,array(),true);
diff --git a/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc b/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc
index 1fde58e56bcd3cabc83a804576187b2982b87c8f..eccfc0bd046121b3a9570a9d7191dff6047737fa 100644 (file)
{
$this->InitCalled = true;
$this->Result = array();
- $_SESSION['faiSummaryTab']['UniqueID'] = 0;
/* Get classes & release name
There are 2 different tabs which use the summary tab
diff --git a/gosa-core/plugins/admin/fai/class_faiTemplate.inc b/gosa-core/plugins/admin/fai/class_faiTemplate.inc
index 89e0b2d06f1a84d07981dbb1f9c3be760884f5df..9c1699624089dbdb40535d04fdc1fe6433fce642 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $faifilter = session::get('faifilter');
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
-# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']);
+ if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
prepare_to_save_FAI_object($use_dn,array(),true);
diff --git a/gosa-core/plugins/admin/fai/class_faiTemplateEntry.inc b/gosa-core/plugins/admin/fai/class_faiTemplateEntry.inc
index 44621681f29f2e2eef70e8f66969685804965332..a0734aa6abc34d62ace4dd68551d2cc14187efbf 100644 (file)
session::set('binary',$this->FAItemplateFile);
session::set('binarytype','octet-stream');
- $_SESSION['binaryfile'] = basename( $this->FAItemplatePath );
+ session::set('binaryfile',basename($this->FAItemplatePath));
if(!empty($this->dn) && $this->dn != "new"){
$ldap = $this->config->get_ldap_link();
session::set('binary',$this->FAItemplateFile);
session::set('binarytype','octet-stream');
- $_SESSION['binaryfile'] = basename( $this->FAItemplatePath );
+ session::set('binaryfile',basename($this->FAItemplatePath));
}
}
diff --git a/gosa-core/plugins/admin/fai/class_faiVariable.inc b/gosa-core/plugins/admin/fai/class_faiVariable.inc
index f21ab7cdc1e13fe0580147fb1fd24e75e38f598d..ce543b15c94441bdccb9c43f99ed44cd1682613a 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $faifilter = session::get('faifilter');
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $this->dn);
+ if($faifilter['branch'] == "main"){
$use_dn = $this->dn;
}
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
- $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
- if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $faifilter['branch'], $obj['dn']);
+ if($faifilter['branch'] == "main"){
$use_dn = $obj['dn'];
}
prepare_to_save_FAI_object($use_dn,array(),true);