From 7997a5c7fecafe190100e42f666cedc82184cfe4 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 12 Dec 2008 11:50:37 +0000 Subject: [PATCH] Added cleanup variable to main.incs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13281 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/main.php | 2 ++ gosa-core/plugins/admin/acl/main.inc | 7 +++++++ gosa-core/plugins/admin/departments/main.inc | 7 +++++++ gosa-core/plugins/admin/groups/main.inc | 7 +++++++ gosa-core/plugins/admin/ogroups/main.inc | 5 +++++ gosa-core/plugins/admin/users/main.inc | 7 +++++++ gosa-core/plugins/personal/generic/main.inc | 7 +++++++ gosa-core/plugins/personal/password/main.inc | 5 +++++ gosa-core/plugins/personal/posix/main.inc | 8 ++++++++ gosa-plugins/addressbook/addons/addressbook/main.inc | 6 ++++++ .../connectivity/personal/connectivity/main.inc | 8 ++++++++ gosa-plugins/dak/addons/dak/main.inc | 8 ++++++++ gosa-plugins/dfs/addons/godfs/main.inc | 11 +++++++++++ gosa-plugins/fai/admin/fai/main.inc | 8 +++++++- gosa-plugins/gofax/gofax/blocklists/main.inc | 9 ++++++++- gosa-plugins/gofax/gofax/faxaccount/main.inc | 8 ++++++++ gosa-plugins/gofax/gofax/faxreports/main.inc | 7 +++++++ gosa-plugins/gofon/gofon/conference/main.inc | 8 +++++++- gosa-plugins/gofon/gofon/fonreports/main.inc | 7 +++++++ gosa-plugins/gofon/gofon/macro/main.inc | 8 +++++++- gosa-plugins/gofon/gofon/phoneaccount/main.inc | 8 ++++++++ gosa-plugins/goto/addons/goto/main.inc | 7 +++++++ gosa-plugins/goto/admin/applications/main.inc | 7 ++++++- gosa-plugins/goto/admin/devices/main.inc | 8 +++++++- gosa-plugins/goto/admin/mimetypes/main.inc | 8 +++++++- gosa-plugins/goto/personal/environment/main.inc | 8 ++++++++ gosa-plugins/ldapmanager/addons/ldapmanager/main.inc | 7 +++++++ gosa-plugins/log/addons/logview/main.inc | 9 +++++++++ gosa-plugins/mail/addons/mailqueue/main.inc | 6 ++++++ gosa-plugins/mail/personal/mail/main.inc | 9 +++++++++ gosa-plugins/nagios/personal/nagios/main.inc | 8 ++++++++ gosa-plugins/netatalk/personal/netatalk/main.inc | 10 +++++++++- gosa-plugins/samba/personal/samba/main.inc | 8 ++++++++ gosa-plugins/scalix/personal/scalix/main.inc | 7 +++++++ gosa-plugins/sudo/admin/sudo/main.inc | 8 +++++++- gosa-plugins/systems/admin/systems/main.inc | 8 +++++++- 36 files changed, 259 insertions(+), 10 deletions(-) diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index 2cb0440db..e358c4109 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -199,12 +199,14 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){ if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != "" || isset($_POST['delete_lock'])){ if (is_file("$old_plugin_dir/main.inc")){ $remove_lock= true; + $cleanup= true; $display = ""; require_once ("$old_plugin_dir/main.inc"); $display = ""; } } $remove_lock= false; +$cleanup= false; /* Check for sizelimits */ eval_sizelimit(); diff --git a/gosa-core/plugins/admin/acl/main.inc b/gosa-core/plugins/admin/acl/main.inc index 23461bb13..edfd23da3 100644 --- a/gosa-core/plugins/admin/acl/main.inc +++ b/gosa-core/plugins/admin/acl/main.inc @@ -20,6 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('macl'); +} + + if ($remove_lock){ if(session::is_set('macl')){ $macl = session::get('macl'); diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc index 8eecd8276..35f451354 100644 --- a/gosa-core/plugins/admin/departments/main.inc +++ b/gosa-core/plugins/admin/departments/main.inc @@ -20,6 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('department'); +} + + if ($remove_lock){ if(session::is_set('department')){ $department = session::get('department'); diff --git a/gosa-core/plugins/admin/groups/main.inc b/gosa-core/plugins/admin/groups/main.inc index a57e08dfa..4f9aaf72f 100644 --- a/gosa-core/plugins/admin/groups/main.inc +++ b/gosa-core/plugins/admin/groups/main.inc @@ -20,6 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('groupManagement'); +} + + if ($remove_lock){ if(session::is_set('groupManagement')){ $groupManagement = session::get('groupManagement'); diff --git a/gosa-core/plugins/admin/ogroups/main.inc b/gosa-core/plugins/admin/ogroups/main.inc index e571d7c21..856adacff 100644 --- a/gosa-core/plugins/admin/ogroups/main.inc +++ b/gosa-core/plugins/admin/ogroups/main.inc @@ -20,6 +20,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('ogroup'); +} if ($remove_lock){ diff --git a/gosa-core/plugins/admin/users/main.inc b/gosa-core/plugins/admin/users/main.inc index 1ca3e6eb4..05d3eddf9 100644 --- a/gosa-core/plugins/admin/users/main.inc +++ b/gosa-core/plugins/admin/users/main.inc @@ -20,6 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('userManagement'); +} + + if ($remove_lock){ if(session::is_set('userManagement')){ $userManagement = session::get('userManagement'); diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc index b3fc2e0f1..6be96e249 100644 --- a/gosa-core/plugins/personal/generic/main.inc +++ b/gosa-core/plugins/personal/generic/main.inc @@ -24,6 +24,13 @@ $display = ""; $lock_msg = ""; +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('user'); + session::un_set('edit'); +} + if ( $remove_lock){ if(session::is_set('user') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-core/plugins/personal/password/main.inc b/gosa-core/plugins/personal/password/main.inc index 568aafa40..9b5c981ca 100644 --- a/gosa-core/plugins/personal/password/main.inc +++ b/gosa-core/plugins/personal/password/main.inc @@ -23,6 +23,11 @@ /* Clear display */ $display= ""; +if ( $cleanup ){ + session::un_set('password'); + session::un_set('edit'); +} + if (!$remove_lock){ /* Reset requested? */ diff --git a/gosa-core/plugins/personal/posix/main.inc b/gosa-core/plugins/personal/posix/main.inc index 8cb18d304..9af7d5edb 100644 --- a/gosa-core/plugins/personal/posix/main.inc +++ b/gosa-core/plugins/personal/posix/main.inc @@ -23,6 +23,14 @@ /* Clear display */ $display = ""; $lock_msg = ""; + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('posixAccount'); + session::un_set('edit'); +} + if ( $remove_lock){ if(session::is_set('posixAccount') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/addressbook/addons/addressbook/main.inc b/gosa-plugins/addressbook/addons/addressbook/main.inc index 3535b05f9..cffab3127 100644 --- a/gosa-plugins/addressbook/addons/addressbook/main.inc +++ b/gosa-plugins/addressbook/addons/addressbook/main.inc @@ -18,6 +18,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('addressbook'); +} + if (!$remove_lock){ /* Create phonelist object on demand */ if (!session::is_set('addressbook') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ diff --git a/gosa-plugins/connectivity/personal/connectivity/main.inc b/gosa-plugins/connectivity/personal/connectivity/main.inc index b19aec384..e284a6114 100644 --- a/gosa-plugins/connectivity/personal/connectivity/main.inc +++ b/gosa-plugins/connectivity/personal/connectivity/main.inc @@ -18,6 +18,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('connectivity'); + session::un_set('edit'); +} + + if ( $remove_lock){ if(session::is_set('connectivity') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/dak/addons/dak/main.inc b/gosa-plugins/dak/addons/dak/main.inc index 3ffdd5f8a..9efe18685 100644 --- a/gosa-plugins/dak/addons/dak/main.inc +++ b/gosa-plugins/dak/addons/dak/main.inc @@ -17,6 +17,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('dak_plug'); +} + + if (!$remove_lock){ if (!session::is_set('dak_plug') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ session::set('dak_plug',new dakplug($config)); diff --git a/gosa-plugins/dfs/addons/godfs/main.inc b/gosa-plugins/dfs/addons/godfs/main.inc index 524d166cf..b4047a662 100644 --- a/gosa-plugins/dfs/addons/godfs/main.inc +++ b/gosa-plugins/dfs/addons/godfs/main.inc @@ -1,4 +1,15 @@ remove_lock(); - session::un_set ('FAI'); } } else { /* Create usermanagement object on demand */ diff --git a/gosa-plugins/gofax/gofax/blocklists/main.inc b/gosa-plugins/gofax/gofax/blocklists/main.inc index 8cc5c6e6e..bc3f555f2 100644 --- a/gosa-plugins/gofax/gofax/blocklists/main.inc +++ b/gosa-plugins/gofax/gofax/blocklists/main.inc @@ -1,9 +1,16 @@ remove_lock ($ui->dn); - session::un_set ('blocklist'); } } else { /* Create blocklist object on demand */ diff --git a/gosa-plugins/gofax/gofax/faxaccount/main.inc b/gosa-plugins/gofax/gofax/faxaccount/main.inc index 2bfe4a510..8d4d3966d 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/main.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/main.inc @@ -3,6 +3,14 @@ $display =""; $lock_msg = ""; +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('gofaxAccount'); + session::un_set ('edit'); +} + + if (!$remove_lock){ /* Reset requested? */ diff --git a/gosa-plugins/gofax/gofax/faxreports/main.inc b/gosa-plugins/gofax/gofax/faxreports/main.inc index 0f1b4d7bf..89a2571ca 100644 --- a/gosa-plugins/gofax/gofax/faxreports/main.inc +++ b/gosa-plugins/gofax/gofax/faxreports/main.inc @@ -1,5 +1,12 @@ remove_lock(); - session::un_set ('conference'); } } else { /* Create usermanagement object on demand */ diff --git a/gosa-plugins/gofon/gofon/fonreports/main.inc b/gosa-plugins/gofon/gofon/fonreports/main.inc index 4f85de2de..eaf2d0c8a 100644 --- a/gosa-plugins/gofon/gofon/fonreports/main.inc +++ b/gosa-plugins/gofon/gofon/fonreports/main.inc @@ -1,5 +1,12 @@ remove_lock(); - session::un_set ('macroManagement'); } } else { diff --git a/gosa-plugins/gofon/gofon/phoneaccount/main.inc b/gosa-plugins/gofon/gofon/phoneaccount/main.inc index 957e31c79..3c52005be 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/main.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/main.inc @@ -20,6 +20,14 @@ $display = ""; $lock_msg = ""; + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('phoneAccount'); +} + + if (!$remove_lock){ /* Reset requested? */ if (isset($_POST['edit_cancel']) || diff --git a/gosa-plugins/goto/addons/goto/main.inc b/gosa-plugins/goto/addons/goto/main.inc index ade2ef7a4..e61909a97 100644 --- a/gosa-plugins/goto/addons/goto/main.inc +++ b/gosa-plugins/goto/addons/goto/main.inc @@ -20,6 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('gotomasses'); +} + + if (!$remove_lock){ /* Create gotomasses object on demand */ diff --git a/gosa-plugins/goto/admin/applications/main.inc b/gosa-plugins/goto/admin/applications/main.inc index e65aac7fd..81e3abc5c 100644 --- a/gosa-plugins/goto/admin/applications/main.inc +++ b/gosa-plugins/goto/admin/applications/main.inc @@ -18,11 +18,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('applicationManagement'); +} + if ($remove_lock){ if(session::is_set('applicationManagement')){ $applicationManagement = session::get('applicationManagement'); $applicationManagement->remove_lock(); - session::un_set ('applicationManagement'); } } else { /* Create applicationManagement object on demand */ diff --git a/gosa-plugins/goto/admin/devices/main.inc b/gosa-plugins/goto/admin/devices/main.inc index 432ee1643..348808529 100644 --- a/gosa-plugins/goto/admin/devices/main.inc +++ b/gosa-plugins/goto/admin/devices/main.inc @@ -18,11 +18,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('DeviceManagement'); +} + + if ($remove_lock){ if(session::is_set('DeviceManagement')){ $DeviceManagement = session::get('DeviceManagement'); $DeviceManagement->remove_lock(); - session::un_set ('DeviceManagement'); } } else { diff --git a/gosa-plugins/goto/admin/mimetypes/main.inc b/gosa-plugins/goto/admin/mimetypes/main.inc index 24268e027..cb55e1fa4 100644 --- a/gosa-plugins/goto/admin/mimetypes/main.inc +++ b/gosa-plugins/goto/admin/mimetypes/main.inc @@ -18,11 +18,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('MimeTypeManagement'); +} + + if ($remove_lock){ if(session::is_set('MimeTypeManagement')){ $MimeTypeManagement = session::get('MimeTypeManagement'); $MimeTypeManagement->remove_lock(); - session::un_set ('MimeTypeManagement'); } } else { diff --git a/gosa-plugins/goto/personal/environment/main.inc b/gosa-plugins/goto/personal/environment/main.inc index 4fb93711f..094ffd70f 100644 --- a/gosa-plugins/goto/personal/environment/main.inc +++ b/gosa-plugins/goto/personal/environment/main.inc @@ -18,6 +18,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ $lock_msg = ""; + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('environment'); + session::un_set('edit'); +} + if ( $remove_lock){ if(session::is_set('environment') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc index a93cb0c69..0c7904b39 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc @@ -18,6 +18,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('ldif'); +} + if (!$remove_lock){ /* Create phonelist object on demand */ if (!session::is_set('ldif') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ diff --git a/gosa-plugins/log/addons/logview/main.inc b/gosa-plugins/log/addons/logview/main.inc index 88769d0c2..b42b0f6c7 100644 --- a/gosa-plugins/log/addons/logview/main.inc +++ b/gosa-plugins/log/addons/logview/main.inc @@ -17,6 +17,15 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('log_tabs'); +} + + if (!$remove_lock){ /* Create logview object on demand */ diff --git a/gosa-plugins/mail/addons/mailqueue/main.inc b/gosa-plugins/mail/addons/mailqueue/main.inc index 1fcfe425c..c3cd34ca8 100644 --- a/gosa-plugins/mail/addons/mailqueue/main.inc +++ b/gosa-plugins/mail/addons/mailqueue/main.inc @@ -18,6 +18,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('mailqueue'); +} + if (!$remove_lock){ /* Create mailqueue object on demand */ if (!session::is_set('mailqueue') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ diff --git a/gosa-plugins/mail/personal/mail/main.inc b/gosa-plugins/mail/personal/mail/main.inc index 205083bca..80957462b 100644 --- a/gosa-plugins/mail/personal/mail/main.inc +++ b/gosa-plugins/mail/personal/mail/main.inc @@ -20,6 +20,15 @@ $lock_msg =""; $display =""; + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('mailAccount'); + session::un_set('edit'); +} + + if ( $remove_lock){ if(session::is_set('mailAccount') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/nagios/personal/nagios/main.inc b/gosa-plugins/nagios/personal/nagios/main.inc index 750e2ee04..bcb8fccc7 100644 --- a/gosa-plugins/nagios/personal/nagios/main.inc +++ b/gosa-plugins/nagios/personal/nagios/main.inc @@ -21,6 +21,14 @@ $display = ""; $lock_msg = ""; +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('nagiosAccount'); + session::un_set('edit'); +} + + if ( $remove_lock){ if(session::is_set('nagiosAccount') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/netatalk/personal/netatalk/main.inc b/gosa-plugins/netatalk/personal/netatalk/main.inc index 83ecfbc29..ec3989688 100644 --- a/gosa-plugins/netatalk/personal/netatalk/main.inc +++ b/gosa-plugins/netatalk/personal/netatalk/main.inc @@ -20,6 +20,14 @@ */ $lock_msg = ""; + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('netatalk'); + session::un_set('edit'); +} + if ( $remove_lock){ if(session::is_set('netatalk') && session::is_set('edit')){ del_lock ($ui->dn); @@ -89,7 +97,7 @@ if ( $remove_lock){ } /* Execute formular */ - if(!empty($lock_msg(){ + if(!empty($lock_msg)){ $display = $lock_msg; }else{ $display.= $netatalk->execute (); diff --git a/gosa-plugins/samba/personal/samba/main.inc b/gosa-plugins/samba/personal/samba/main.inc index f1dc45a06..9067f2107 100644 --- a/gosa-plugins/samba/personal/samba/main.inc +++ b/gosa-plugins/samba/personal/samba/main.inc @@ -20,6 +20,14 @@ $display = ""; $lock_msg = ""; + +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('sambaAccount'); + session::un_set('edit'); +} + if ( $remove_lock){ if(session::is_set('sambaAccount') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/scalix/personal/scalix/main.inc b/gosa-plugins/scalix/personal/scalix/main.inc index ae033b073..d0ee2b973 100644 --- a/gosa-plugins/scalix/personal/scalix/main.inc +++ b/gosa-plugins/scalix/personal/scalix/main.inc @@ -19,6 +19,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('scalixAccount'); + session::un_set('edit'); +} + if ( $remove_lock){ if(session::is_set('scalixAccount') && session::is_set('edit')){ del_lock ($ui->dn); diff --git a/gosa-plugins/sudo/admin/sudo/main.inc b/gosa-plugins/sudo/admin/sudo/main.inc index bfb7e2596..11096e0ea 100644 --- a/gosa-plugins/sudo/admin/sudo/main.inc +++ b/gosa-plugins/sudo/admin/sudo/main.inc @@ -20,11 +20,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('sudoManagement'); +} + + if ($remove_lock){ if(session::is_set('sudoManagement')){ $sudoManagement = session::get('sudoManagement'); $sudoManagement->remove_lock(); - session::un_set ('sudoManagement'); } } else { /* Create sudoManagement object on demand */ diff --git a/gosa-plugins/systems/admin/systems/main.inc b/gosa-plugins/systems/admin/systems/main.inc index c33f6ba3c..90bc586dc 100644 --- a/gosa-plugins/systems/admin/systems/main.inc +++ b/gosa-plugins/systems/admin/systems/main.inc @@ -20,11 +20,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Remove classes and variables from session + */ +if ( $cleanup ){ + session::un_set('systems'); +} + + if ($remove_lock){ if(session::is_set('systems')){ $systems = session::get('systems'); $systems->remove_lock(); - session::un_set ('systems'); } } else { /* Create usermanagement object on demand */ -- 2.30.2