From: hickert Date: Fri, 12 Dec 2008 08:33:21 +0000 (+0000) Subject: Moved direct session access of 'objectinfo' into functions inc. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dc7547fdb80a615660085bd6fa7d168c727a59b6;p=gosa.git Moved direct session access of 'objectinfo' into functions inc. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13270 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index b086da606..1af6890ac 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -246,9 +246,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ /* Load department list when plugin has changed. That is some kind of compromise between speed and beeing up to date */ if (isset($_GET['reset'])){ - if (session::is_set('objectinfo')){ - session::un_set('objectinfo'); - } + set_object_info(); } /* show web frontend */ diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 5d500d4b3..8129514a2 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2807,6 +2807,17 @@ function cred_decrypt($input,$password) { return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $password, pack("H*", $input), MCRYPT_MODE_ECB, $iv); } +function get_object_info() +{ + return(session::get('objectinfo')); +} + +function set_object_info($str = "") +{ + echo "-->> $str
"; + session::set('objectinfo',$str); +} + // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index b76a86214..23cdbeb6d 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -204,7 +204,7 @@ class aclManagement extends plugin } /* Set ACL and move DN to the headline */ - session::set('objectinfo',$this->dn); + set_object_info($this->dn); }else{ msg_dialog::display(_("Permission error"), msgPool::permModify(), ERROR_DIALOG); } @@ -216,14 +216,14 @@ class aclManagement extends plugin ********************/ if(isset($_POST['delete_lock'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } /* Reset all relevant data, if we get a _cancel request */ if (isset($_POST['edit_cancel'])){ $this->remove_lock(); $this->acltabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -397,7 +397,7 @@ class aclManagement extends plugin unset ($this->acltabs); $this->acltabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } } else { /* Ok. There seem to be errors regarding to the tab data, diff --git a/gosa-core/plugins/admin/acl/main.inc b/gosa-core/plugins/admin/acl/main.inc index ed3a0582c..8e551a60f 100644 --- a/gosa-core/plugins/admin/acl/main.inc +++ b/gosa-core/plugins/admin/acl/main.inc @@ -40,8 +40,8 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $output= $macl->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management")); } diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 5edf9e57a..34e42046e 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -176,7 +176,7 @@ class departmentManagement extends plugin $this->deptabs= new deptabs($this->config,$this->config->data['TABS'][$data['TAB']], $this->dn,"department"); $this->deptabs->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } } @@ -359,7 +359,7 @@ class departmentManagement extends plugin } unset ($this->deptabs); $this->deptabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -373,7 +373,7 @@ class departmentManagement extends plugin if (isset($_POST['edit_cancel']) || isset($_POST['delete_cancel']) || isset($_POST['delete_department_confirm'])){ $this->remove_lock(); $this->deptabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } /* Headpage or normal plugin screen? */ diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc index 921be55f6..565ed9f98 100644 --- a/gosa-core/plugins/admin/departments/main.inc +++ b/gosa-core/plugins/admin/departments/main.inc @@ -38,8 +38,8 @@ if ($remove_lock){ $output= $department->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management")); } diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index f0045b3d5..6a25a28f5 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -268,7 +268,7 @@ class groupManagement extends plugin //$this->reload (); unset ($this->grouptab); $this->grouptab= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -303,7 +303,7 @@ class groupManagement extends plugin $tmp->lock_entries($this->ui->dn); if($tmp->multiple_available()){ $this->grouptab = $tmp; - session::set('objectinfo',$this->grouptab->get_object_info()); + set_object_info($this->grouptab->get_object_info()); } } @@ -328,7 +328,7 @@ class groupManagement extends plugin /* Register grouptab to trigger edit dialog */ $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn); $this->grouptab->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -495,7 +495,7 @@ class groupManagement extends plugin /* Remove lock file after successfull deletion */ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } @@ -506,7 +506,7 @@ class groupManagement extends plugin /* Delete group canceled? */ if (isset($_POST['delete_cancel'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } @@ -520,7 +520,7 @@ class groupManagement extends plugin $this->remove_lock(); } $this->grouptab= NULL; - session::un_set('objectinfo'); + set_object_info(); } diff --git a/gosa-core/plugins/admin/groups/main.inc b/gosa-core/plugins/admin/groups/main.inc index e402b2a7e..5cb881575 100644 --- a/gosa-core/plugins/admin/groups/main.inc +++ b/gosa-core/plugins/admin/groups/main.inc @@ -36,11 +36,11 @@ if ($remove_lock){ $output= $groupManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ + if (get_object_info() != ""){ $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration"), "\"\" ". - LDAP::fix(session::get('objectinfo'))); + LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration")); } diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index b4f98f9c6..05dbc79ea 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -368,7 +368,7 @@ class ogroupManagement extends plugin /* Remove lock file after successfull deletion */ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } @@ -379,7 +379,7 @@ class ogroupManagement extends plugin /* Delete group canceled? */ if (isset($_POST['delete_cancel'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } @@ -405,7 +405,7 @@ class ogroupManagement extends plugin /* Register grouptab to trigger edit dialog */ $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups"); $this->ogroup->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -434,7 +434,7 @@ class ogroupManagement extends plugin unset ($this->ogroup); $this->ogroup= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -458,7 +458,7 @@ class ogroupManagement extends plugin if ((isset($_POST['edit_cancel'])) && (isset($this->ogroup->dn))){ $this->remove_lock(); $this->ogroup= NULL; - session::un_set('objectinfo'); + set_object_info(); } diff --git a/gosa-core/plugins/admin/ogroups/main.inc b/gosa-core/plugins/admin/ogroups/main.inc index 918c970aa..2b1a74025 100644 --- a/gosa-core/plugins/admin/ogroups/main.inc +++ b/gosa-core/plugins/admin/ogroups/main.inc @@ -41,12 +41,12 @@ if ($remove_lock){ $output= $ogroup->execute (); /* Page header*/ - if (session::is_set('objectinfo')){ + if (get_object_info() != ""){ $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + "\"> ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups")); } diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 98e2b87e9..f5b8b6ecc 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -323,7 +323,7 @@ class userManagement extends plugin $this->sn= ""; $this->givenName= ""; $this->uid= ""; - session::un_set('objectinfo'); + set_object_info(); } @@ -372,7 +372,7 @@ class userManagement extends plugin /* User is allowed to change passwords, save 'dn' and 'acl' for next dialog. */ - session::set('objectinfo',$this->dn); + set_object_info($this->dn); return ($smarty->fetch(get_template_path('password.tpl', TRUE))); } else { /* User is not allowed. Show message and cancel. */ @@ -412,7 +412,7 @@ class userManagement extends plugin /* Set ACL and move DN to the headline */ $this->usertab->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -436,7 +436,7 @@ class userManagement extends plugin if($tmp->multiple_available()){ $this->usertab = $tmp; $this->usertab->set_active_tab($s_tab); - session::set('objectinfo',$this->usertab->get_object_info()); + set_object_info($this->usertab->get_object_info()); } } @@ -455,7 +455,7 @@ class userManagement extends plugin $this->sn= ""; $this->givenName= ""; $this->uid= ""; - session::un_set('objectinfo'); + set_object_info(); } @@ -735,7 +735,7 @@ class userManagement extends plugin unset ($this->usertab); $this->usertab= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ diff --git a/gosa-core/plugins/admin/users/main.inc b/gosa-core/plugins/admin/users/main.inc index eade63a44..815f27ab9 100644 --- a/gosa-core/plugins/admin/users/main.inc +++ b/gosa-core/plugins/admin/users/main.inc @@ -39,12 +39,12 @@ if ($remove_lock){ $output= $userManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ + if (get_object_info() != ""){ $display= print_header(get_template_path($userManagement->plIcon), _("User administration"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + "\"> ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($userManagement->plIcon), _("User administration")); diff --git a/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc b/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc index 5a29f61c3..1774090f4 100644 --- a/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc +++ b/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc @@ -96,7 +96,7 @@ class dfsManagment extends plugin { $this->dfstab = new dfstabs($this->config, $this->config->data['TABS']['DFSTABS'], $this->dn); $this->dfstab->set_acl($this->acl); $this->dfstab->save_object(); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } } @@ -120,11 +120,11 @@ class dfsManagment extends plugin { # cancel pressed if (isset($_POST['edit_cancel'])) { - del_lock (session::get('objectinfo')); + del_lock (get_object_info()); unset ($this->dfstab); $this->dfstab = NULL; $this->dn = ""; - session::un_set('objectinfo'); + set_object_info(); } # delete pressed @@ -148,11 +148,11 @@ class dfsManagment extends plugin { msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->basedn, LDAP_DEL, get_class())); } - del_lock (session::get('objectinfo')); + del_lock (get_object_info()); unset ($this->dfstab); $this->dfstab = NULL; $this->dn = ""; - session::un_set('objectinfo'); + set_object_info(); } # generate main page no tabs diff --git a/gosa-plugins/dfs/addons/godfs/main.inc b/gosa-plugins/dfs/addons/godfs/main.inc index c658c0980..524d166cf 100644 --- a/gosa-plugins/dfs/addons/godfs/main.inc +++ b/gosa-plugins/dfs/addons/godfs/main.inc @@ -22,12 +22,12 @@ } # create page header - if (session::is_set('objectinfo')) { + if (get_object_info() != "") { $display = print_header(get_template_path('plugins/dfs/images/dfs.png'), _("Distributed File System Administration"), "\"\" ".session::get('objectinfo')); + "\"> ".get_object_info()); } else { $display = print_header(get_template_path('plugins/dfs/images/dfs.png'), _("Distributed File System Administration")); diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index d651382fc..e71fc1b85 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -158,7 +158,7 @@ class faiHook extends plugin $this->dialog->set_acl_base($this->acl_base_for_current_object($obj['dn'])); $this->dialog->set_acl_category("fai"); - session::set('objectinfo',$obj['dn']); + set_object_info($obj['dn']); $this->dialog->parent = &$this; $this->is_dialog=true; } @@ -203,7 +203,7 @@ class faiHook extends plugin $this->dialog->acl = $this->acl; $this->dialog->set_acl_base($this->acl_base_for_current_object($obj['dn'])); $this->dialog->set_acl_category("fai"); - session::set('objectinfo',$obj['dn']); + set_object_info($obj['dn']); $this->dialog->parent = &$this; $this->is_dialog=true; } diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 1668c1250..dc7bac243 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -462,7 +462,7 @@ class faiManagement extends plugin $this->dialog->by_object[$a_setup[1]]->FAIstate = $entry['FAIstate']; $this->dialog->set_acl_base($this->dn); $this->is_dialog = true; - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } } } @@ -921,7 +921,7 @@ class faiManagement extends plugin if(isset($_POST['edit_cancel'])){ $this->dialog=FALSE; $this->is_dialog = false; - session::un_set('objectinfo'); + set_object_info(); $this->remove_lock(); } @@ -973,7 +973,7 @@ class faiManagement extends plugin $this->remove_lock(); $this->dialog=FALSE; $this->is_dialog=false; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index 8ad852ab8..c8b0cdc14 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -128,7 +128,7 @@ class faiPartitionTable extends plugin */ if($this->dn != "new"){ - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } if((isset($_POST['EditDisk']))&&(isset($_POST['disks']))){ @@ -144,10 +144,10 @@ class faiPartitionTable extends plugin /* Set object info string, which will be displayed in plugin info line */ if(isset($this->disks[$Udisk]['dn'])){ - session::set('objectinfo',$this->disks[$Udisk]['dn']); + set_object_info($this->disks[$Udisk]['dn']); $dn = $this->disks[$Udisk]['dn']; }else{ - session::set('objectinfo',""); + set_object_info(""); $dn = "new"; } diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index db8e38e68..dc8359d92 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -144,7 +144,7 @@ class faiScript extends plugin } if($this->dn != "new"){ - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } /* File download requested */ @@ -199,7 +199,7 @@ class faiScript extends plugin $this->dialog->set_acl_category("fai"); /* Assign some additional dialog informations like headline and parent */ - session::set('objectinfo',$obj['dn']); + set_object_info($obj['dn']); $this->dialog->parent = &$this; $this->is_dialog=true; } diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index 0c2dca46d..1a46f050d 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -134,7 +134,7 @@ class faiTemplate extends plugin $this->dialog->FAIstate = $this->FAIstate; $this->dialog->set_acl_category("fai"); - session::set('objectinfo',$obj['dn']); + set_object_info($obj['dn']); $this->dialog->parent = &$this; $this->is_dialog=true; } @@ -178,7 +178,7 @@ class faiTemplate extends plugin $this->dialog->FAIstate = $this->FAIstate; $this->dialog->acl = $this->acl; $this->dialog->set_acl_category("fai"); - session::set('objectinfo',$obj['dn']); + set_object_info($obj['dn']); $this->dialog->parent = &$this; $this->is_dialog=true; } @@ -200,7 +200,7 @@ class faiTemplate extends plugin } if($this->dn != "new"){ - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } /* Save Dialog */ diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc index 6a9150e4e..0847d8842 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariable.inc @@ -99,7 +99,7 @@ class faiVariable extends plugin } if($this->dn != "new"){ - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -113,7 +113,7 @@ class faiVariable extends plugin $this->dialog->set_acl_base($c_dn); $this->dialog->FAIstate = $this->FAIstate; $this->dialog->parent = &$this; - session::set('objectinfo',$this->SubObjects[$var]['dn']); + set_object_info($this->SubObjects[$var]['dn']); $this->is_dialog=true; } diff --git a/gosa-plugins/fai/admin/fai/main.inc b/gosa-plugins/fai/admin/fai/main.inc index 88dfff1cc..e58e59da5 100644 --- a/gosa-plugins/fai/admin/fai/main.inc +++ b/gosa-plugins/fai/admin/fai/main.inc @@ -40,8 +40,8 @@ if ($remove_lock){ session::un_set ('FAI'); } /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($FAI->plIcon), _("Software deployment")); } diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc index dc7007c89..99afef0db 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc @@ -127,7 +127,7 @@ class blocklist extends plugin $this->remove_lock(); $this->dialog = NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -149,7 +149,7 @@ class blocklist extends plugin $this->remove_lock(); $this->dn= ""; $this->dialog = NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -189,7 +189,7 @@ class blocklist extends plugin }else{ add_lock ($this->dn, $this->ui->dn); } - session::set('objectinfo',trim($this->dn)); + set_object_info(trim($this->dn)); $this->dialog = new faxblocktabs($this->config,$this->config->data['TABS']['FAXBLOCKTABS'],$this->dn); $this->dialog->set_acl_base($this->dn); } diff --git a/gosa-plugins/gofax/gofax/blocklists/main.inc b/gosa-plugins/gofax/gofax/blocklists/main.inc index 36d9edb1a..8cc5c6e6e 100644 --- a/gosa-plugins/gofax/gofax/blocklists/main.inc +++ b/gosa-plugins/gofax/gofax/blocklists/main.inc @@ -22,8 +22,8 @@ if ($remove_lock){ } /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "\"\"align=\"middle\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "\"\"align=\"middle\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management")); } diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc index 14e6131e8..4bf90de84 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc @@ -148,7 +148,7 @@ class phoneConferenceManagment extends plugin $this->conftab= NULL; $this->lognames= array();; $this->cn= ""; - session::un_set('objectinfo'); + set_object_info(); } @@ -311,7 +311,7 @@ class phoneConferenceManagment extends plugin /* Register conftab to trigger edit dialog */ $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference"); $this->conftab->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -329,7 +329,7 @@ class phoneConferenceManagment extends plugin $this->dn= "new"; $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference"); $this->conftab->set_acl_base($dummy_dn); - session::un_set('objectinfo'); + set_object_info(); } } @@ -355,7 +355,7 @@ class phoneConferenceManagment extends plugin if (!isset($_POST['edit_apply'])){ $this->remove_lock(); $this->conftab= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ diff --git a/gosa-plugins/gofon/gofon/conference/main.inc b/gosa-plugins/gofon/gofon/conference/main.inc index 1896d125b..1874c2cec 100644 --- a/gosa-plugins/gofon/gofon/conference/main.inc +++ b/gosa-plugins/gofon/gofon/conference/main.inc @@ -34,8 +34,8 @@ if ($remove_lock){ $output= $conference->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management")); } diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc index 4dc2f7c86..faad636f7 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc @@ -168,7 +168,7 @@ class goFonMacro extends plugin $this->remove_lock(); unset ($this->macrotabs); $this->macrotabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -201,7 +201,7 @@ class goFonMacro extends plugin unset ($this->macrotabs); $this->macrotabs= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -242,7 +242,7 @@ class goFonMacro extends plugin /* Register macrotabs to trigger edit dialog */ $this->macrotabs= new macrotabs($this->config, $this->config->data['TABS']['MACROTABS'], $this->dn,"gofonmacro"); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } } diff --git a/gosa-plugins/gofon/gofon/macro/main.inc b/gosa-plugins/gofon/gofon/macro/main.inc index 9231bc01c..474e032dc 100644 --- a/gosa-plugins/gofon/gofon/macro/main.inc +++ b/gosa-plugins/gofon/gofon/macro/main.inc @@ -37,11 +37,11 @@ if ($remove_lock){ $output= $macroManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ + if (get_object_info() != ""){ $display= print_header( get_template_path('images/macros.png'), _("Phone macro management"), "\"\" - ".LDAP::fix(session::get('objectinfo'))); + ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/gofon/images/macros.png'), _("Phone macro management")); } diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index a8959a121..ddfb16123 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -248,7 +248,7 @@ class applicationManagement extends plugin if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){ $this->remove_lock(); $this->apptabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -279,7 +279,7 @@ class applicationManagement extends plugin $this->remove_lock(); } $this->apptabs= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -322,7 +322,7 @@ class applicationManagement extends plugin } $this->apptabs->parent = &$this; $this->apptabs->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -500,7 +500,7 @@ class applicationManagement extends plugin /* Delete application canceled? */ if (isset($_POST['delete_cancel'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } /* Show tab dialog if object is present */ diff --git a/gosa-plugins/goto/admin/applications/main.inc b/gosa-plugins/goto/admin/applications/main.inc index f8233b272..e65aac7fd 100644 --- a/gosa-plugins/goto/admin/applications/main.inc +++ b/gosa-plugins/goto/admin/applications/main.inc @@ -34,8 +34,8 @@ if ($remove_lock){ $output= $applicationManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management")); } diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index 7f2e02171..1acd7d6fa 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -149,7 +149,7 @@ class deviceManagement extends plugin if (isset($_POST['edit_cancel']) && is_object($this->devicetabs)){ $this->remove_lock(); $this->devicetabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -179,7 +179,7 @@ class deviceManagement extends plugin } unset ($this->devicetabs); $this->devicetabs= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -219,7 +219,7 @@ class deviceManagement extends plugin /* Register devicetabs to trigger edit dialog */ $this->devicetabs= new devicetabs($this->config,$this->config->data['TABS']['DEVICETABS'], $this->dn,"devices"); $this->devicetabs->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -395,7 +395,7 @@ class deviceManagement extends plugin /* Delete device canceled? */ if (isset($_POST['delete_cancel'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } /* Show tab dialog if object is present */ diff --git a/gosa-plugins/goto/admin/devices/main.inc b/gosa-plugins/goto/admin/devices/main.inc index 00c39ba42..432ee1643 100644 --- a/gosa-plugins/goto/admin/devices/main.inc +++ b/gosa-plugins/goto/admin/devices/main.inc @@ -37,8 +37,8 @@ if ($remove_lock){ $output= $DeviceManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management")); } diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index 397e0bee1..f7be97b7e 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -259,7 +259,7 @@ class mimetypeManagement extends plugin if (isset($_POST['edit_cancel'])){ $this->remove_lock(); $this->mimetabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } @@ -288,7 +288,7 @@ class mimetypeManagement extends plugin } unset ($this->mimetabs); $this->mimetabs= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -331,7 +331,7 @@ class mimetypeManagement extends plugin } $this->mimetabs->parent = &$this; $this->mimetabs->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -509,7 +509,7 @@ class mimetypeManagement extends plugin /* Delete mime type canceled? */ if (isset($_POST['delete_cancel'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } /* Show tab dialog if object is present */ diff --git a/gosa-plugins/goto/admin/mimetypes/main.inc b/gosa-plugins/goto/admin/mimetypes/main.inc index fcfd5167b..24268e027 100644 --- a/gosa-plugins/goto/admin/mimetypes/main.inc +++ b/gosa-plugins/goto/admin/mimetypes/main.inc @@ -37,8 +37,8 @@ if ($remove_lock){ $output= $MimeTypeManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management")); } diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc index 3e8c58fd8..7a1365bb4 100644 --- a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc +++ b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc @@ -180,7 +180,7 @@ class sudoManagement extends plugin } unset ($this->sudotabs); $this->sudotabs= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -216,7 +216,7 @@ class sudoManagement extends plugin /* Register sudotabs to trigger edit dialog */ $this->sudotabs= new sudotabs($this->config,$this->config->data['TABS']['SUDOTABS'], $this->dn); $this->sudotabs->set_acl_base($this->base); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } @@ -321,7 +321,7 @@ class sudoManagement extends plugin if (isset($_POST['edit_cancel']) && is_object($this->sudotabs)){ $this->remove_lock(); $this->sudotabs= NULL; - session::un_set('objectinfo'); + set_object_info(); } diff --git a/gosa-plugins/sudo/admin/sudo/main.inc b/gosa-plugins/sudo/admin/sudo/main.inc index 67738f861..bfb7e2596 100644 --- a/gosa-plugins/sudo/admin/sudo/main.inc +++ b/gosa-plugins/sudo/admin/sudo/main.inc @@ -36,11 +36,11 @@ if ($remove_lock){ $output= $sudoManagement->execute(); /* Page header*/ - if (session::is_set('objectinfo')){ + if (get_object_info() != ""){ $display= print_header(get_template_path('plugins/sudo/images/sudo.png'), _("Sudo role administration"), "\"\" ". - LDAP::fix(session::get('objectinfo'))); + LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path('plugins/sudo/images/sudo.png'), _("Sudo role administration")); } diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 17b1667fe..f29de41cb 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -221,7 +221,7 @@ class systems extends plugin ********************/ if ($s_action=="gen_cd"){ $this->dn= $this->terminals[$s_entry]['dn']; - session::set('objectinfo',$this->dn); + set_object_info($this->dn); return ($smarty->fetch(get_template_path('gencd.tpl', TRUE))); } @@ -565,7 +565,7 @@ class systems extends plugin add_lock ($this->dn, $this->ui->dn); $this->systab= new $tabclass($this->config, $this->config->data['TABS'][$class], $this->dn,$acl_cat); $this->systab->set_acl_base($this->dn); - session::set('objectinfo',$this->dn); + set_object_info($this->dn); } }else{ msg_dialog::display(_("Error"), _("Editing this type of object is not supported yet!"), ERROR_DIALOG); @@ -592,7 +592,7 @@ class systems extends plugin $tabacl = $ui->get_permissions($dn,$acl,"userPassword"); if(preg_match("/w/",$tabacl)){ $this->dn= $this->terminals[$s_entry]['dn']; - session::set('objectinfo',$this->dn); + set_object_info($this->dn); return ($smarty->fetch(get_template_path('password.tpl', TRUE))); }else{ msg_dialog::display(_("Permission error"), _("You have no permission to change this password!"), ERROR_DIALOG); @@ -703,7 +703,7 @@ class systems extends plugin }else{ msg_dialog::display(_("Error"), _("Cannot determine object to change password!"), ERROR_DIALOG); } - session::un_set('objectinfo'); + set_object_info(); } @@ -714,7 +714,7 @@ class systems extends plugin /* Delete terminal canceled? */ if (isset($_POST['delete_cancel']) || isset($_POST['password_cancel'])){ $this->remove_lock(); - session::un_set('objectinfo'); + set_object_info(); } @@ -1002,7 +1002,7 @@ class systems extends plugin unset ($this->systab); $this->systab= NULL; - session::un_set('objectinfo'); + set_object_info(); }else{ /* Reinitialize tab */ @@ -1028,7 +1028,7 @@ class systems extends plugin unset ($this->systab); } $this->systab= NULL; - session::un_set('objectinfo'); + set_object_info(); } /******************** diff --git a/gosa-plugins/systems/admin/systems/main.inc b/gosa-plugins/systems/admin/systems/main.inc index d5fa21e39..c33f6ba3c 100644 --- a/gosa-plugins/systems/admin/systems/main.inc +++ b/gosa-plugins/systems/admin/systems/main.inc @@ -41,8 +41,8 @@ if ($remove_lock){ } /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($systems->plIcon), _("System management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); + if (get_object_info() != ""){ + $display= print_header(get_template_path($systems->plIcon), _("System management"), "\"\" ".LDAP::fix(get_object_info())); } else { $display= print_header(get_template_path($systems->plIcon), _("System management")); }