From 211a5e41a90afc6dca307823a58fa53946874439 Mon Sep 17 00:00:00 2001 From: psc Date: Tue, 24 Mar 2009 10:13:32 +0000 Subject: [PATCH] + Move reset handling before object creation, otherwise no new object is created, when _GET['reset'] is set to 1. + Add missing reset handling where it was removed by changeset 13288. (Fixes Trac #2270) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13559 594d385d-05f5-0310-b6e9-bd551577e9d8 --- trunk/gosa-core/plugins/admin/acl/main.inc | 9 +++++---- trunk/gosa-core/plugins/admin/departments/main.inc | 9 +++++---- trunk/gosa-core/plugins/admin/groups/main.inc | 9 ++++----- trunk/gosa-core/plugins/admin/ogroups/main.inc | 5 +++++ trunk/gosa-core/plugins/admin/users/main.inc | 9 ++++----- .../addressbook/addons/addressbook/main.inc | 4 ++++ trunk/gosa-plugins/dak/addons/dak/main.inc | 4 ++++ trunk/gosa-plugins/dfs/addons/godfs/main.inc | 4 ++++ trunk/gosa-plugins/fai/admin/fai/main.inc | 8 ++++---- trunk/gosa-plugins/gofax/gofax/blocklists/main.inc | 9 ++++----- trunk/gosa-plugins/gofax/gofax/faxreports/main.inc | 4 ++++ trunk/gosa-plugins/gofon/gofon/conference/main.inc | 10 ++++------ trunk/gosa-plugins/gofon/gofon/fonreports/main.inc | 4 ++++ trunk/gosa-plugins/gofon/gofon/macro/main.inc | 10 ++++------ trunk/gosa-plugins/goto/addons/goto/main.inc | 5 ++++- trunk/gosa-plugins/goto/admin/applications/main.inc | 10 ++++------ trunk/gosa-plugins/goto/admin/devices/main.inc | 9 ++++----- trunk/gosa-plugins/goto/admin/mimetypes/main.inc | 9 ++++----- .../ldapmanager/addons/ldapmanager/main.inc | 4 ++++ trunk/gosa-plugins/log/addons/logview/main.inc | 5 ++++- trunk/gosa-plugins/mail/addons/mailqueue/main.inc | 4 ++++ trunk/gosa-plugins/sudo/admin/sudo/main.inc | 13 ++++++------- trunk/gosa-plugins/systems/admin/systems/main.inc | 10 ++++------ 23 files changed, 97 insertions(+), 70 deletions(-) diff --git a/trunk/gosa-core/plugins/admin/acl/main.inc b/trunk/gosa-core/plugins/admin/acl/main.inc index 82fb5b003..47b604853 100644 --- a/trunk/gosa-core/plugins/admin/acl/main.inc +++ b/trunk/gosa-core/plugins/admin/acl/main.inc @@ -37,6 +37,11 @@ if ( $cleanup ){ $display= "No headpage yet for this module"; + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('macl'); + } + /* Create usermanagement object on demand */ if (!session::is_set('macl')){ session::set('macl',new aclManagement($config, $ui)); @@ -54,10 +59,6 @@ if ( $cleanup ){ $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('macl'); - } $display.= $output; session::set('macl',$macl); diff --git a/trunk/gosa-core/plugins/admin/departments/main.inc b/trunk/gosa-core/plugins/admin/departments/main.inc index 2cf55f745..244e7aa50 100644 --- a/trunk/gosa-core/plugins/admin/departments/main.inc +++ b/trunk/gosa-core/plugins/admin/departments/main.inc @@ -35,6 +35,11 @@ if ( $cleanup ){ session::un_set('department'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('department'); + } + /* Create usermanagement object on demand */ if (!session::is_set('department')){ session::set('department',new departmentManagement($config, $ui)); @@ -52,10 +57,6 @@ if ( $cleanup ){ $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('department'); - } $display.= $output; session::set('department',$department); diff --git a/trunk/gosa-core/plugins/admin/groups/main.inc b/trunk/gosa-core/plugins/admin/groups/main.inc index 30fd058be..cf16bd025 100644 --- a/trunk/gosa-core/plugins/admin/groups/main.inc +++ b/trunk/gosa-core/plugins/admin/groups/main.inc @@ -34,6 +34,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('groupManagement'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('groupManagement'); + } /* Create groupManagement object on demand */ if (!session::is_set('groupManagement')){ @@ -55,11 +59,6 @@ if ( $cleanup ){ $display.= $output; - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('groupManagement'); - } - /* Show and save dialog */ session::set('groupManagement',$groupManagement); } diff --git a/trunk/gosa-core/plugins/admin/ogroups/main.inc b/trunk/gosa-core/plugins/admin/ogroups/main.inc index 6de420cc0..8d0838ea1 100644 --- a/trunk/gosa-core/plugins/admin/ogroups/main.inc +++ b/trunk/gosa-core/plugins/admin/ogroups/main.inc @@ -36,6 +36,11 @@ if ( $cleanup ){ session::un_set('ogroup'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('ogroup'); + } + /* Create object object on demand */ if (!session::is_set('ogroup')){ session::set('ogroup',new ogroupManagement ($config)); diff --git a/trunk/gosa-core/plugins/admin/users/main.inc b/trunk/gosa-core/plugins/admin/users/main.inc index 1b37c9d46..e73a3f715 100644 --- a/trunk/gosa-core/plugins/admin/users/main.inc +++ b/trunk/gosa-core/plugins/admin/users/main.inc @@ -34,6 +34,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('userManagement'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('userManagement'); + } /* Create usermanagement object on demand */ if (!session::is_set('userManagement')){ @@ -60,11 +64,6 @@ if ( $cleanup ){ /* Generate dialog output */ $display.= $output; - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('userManagement'); - } - /* Show and save dialog */ session::set('userManagement',$userManagement); } diff --git a/trunk/gosa-plugins/addressbook/addons/addressbook/main.inc b/trunk/gosa-plugins/addressbook/addons/addressbook/main.inc index 8807c0018..d6a7b54b2 100644 --- a/trunk/gosa-plugins/addressbook/addons/addressbook/main.inc +++ b/trunk/gosa-plugins/addressbook/addons/addressbook/main.inc @@ -24,6 +24,10 @@ if ( $cleanup ){ session::un_set('addressbook'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('addressbook'); + } /* Create phonelist object on demand */ if (!session::is_set('addressbook')){ diff --git a/trunk/gosa-plugins/dak/addons/dak/main.inc b/trunk/gosa-plugins/dak/addons/dak/main.inc index c2fcbb005..f85f66570 100644 --- a/trunk/gosa-plugins/dak/addons/dak/main.inc +++ b/trunk/gosa-plugins/dak/addons/dak/main.inc @@ -31,6 +31,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('dak_plug'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('dak_plug'); + } if (!session::is_set('dak_plug')){ session::set('dak_plug',new dakplug($config)); diff --git a/trunk/gosa-plugins/dfs/addons/godfs/main.inc b/trunk/gosa-plugins/dfs/addons/godfs/main.inc index 424b3c54d..5609d0c98 100644 --- a/trunk/gosa-plugins/dfs/addons/godfs/main.inc +++ b/trunk/gosa-plugins/dfs/addons/godfs/main.inc @@ -15,6 +15,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('dfsManagment'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('dfsManagment'); + } # create dfsManagment object if (!session::is_set('dfsManagment')){ diff --git a/trunk/gosa-plugins/fai/admin/fai/main.inc b/trunk/gosa-plugins/fai/admin/fai/main.inc index e1013fd80..4212400c7 100644 --- a/trunk/gosa-plugins/fai/admin/fai/main.inc +++ b/trunk/gosa-plugins/fai/admin/fai/main.inc @@ -33,6 +33,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('FAI'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('FAI'); + } /* Create usermanagement object on demand */ if (!session::is_set('FAI')){ @@ -44,10 +48,6 @@ if ( $cleanup ){ $FAI->save_object(); $output= $FAI->execute(); - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('FAI'); - } /* Page header*/ if (get_object_info() != ""){ $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "\"\" ".LDAP::fix(get_object_info())); diff --git a/trunk/gosa-plugins/gofax/gofax/blocklists/main.inc b/trunk/gosa-plugins/gofax/gofax/blocklists/main.inc index 602d617a8..17bf9640c 100644 --- a/trunk/gosa-plugins/gofax/gofax/blocklists/main.inc +++ b/trunk/gosa-plugins/gofax/gofax/blocklists/main.inc @@ -14,6 +14,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('blocklist'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('blocklist'); + } /* Create blocklist object on demand */ if (!session::is_set('blocklist')){ @@ -25,11 +29,6 @@ if ( $cleanup ){ $blocklist->save_object(); $output= $blocklist->execute(); - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('blocklist'); - } - /* Page header*/ if (get_object_info() != ""){ $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "\"\"align=\"middle\" ".LDAP::fix(get_object_info())); diff --git a/trunk/gosa-plugins/gofax/gofax/faxreports/main.inc b/trunk/gosa-plugins/gofax/gofax/faxreports/main.inc index ac1ffc359..559912789 100644 --- a/trunk/gosa-plugins/gofax/gofax/faxreports/main.inc +++ b/trunk/gosa-plugins/gofax/gofax/faxreports/main.inc @@ -5,6 +5,10 @@ if ( $cleanup ){ session::un_set('faxreport'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('faxreport'); + } /* Create faxreport object on demand */ if (!session::is_set('faxreport')){ diff --git a/trunk/gosa-plugins/gofon/gofon/conference/main.inc b/trunk/gosa-plugins/gofon/gofon/conference/main.inc index 43ad9547c..24e81fa9e 100644 --- a/trunk/gosa-plugins/gofon/gofon/conference/main.inc +++ b/trunk/gosa-plugins/gofon/gofon/conference/main.inc @@ -33,7 +33,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('conference'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('conference'); + } /* Create usermanagement object on demand */ if (!session::is_set('conference')){ @@ -50,11 +53,6 @@ if ( $cleanup ){ $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('conference'); - } - /* Show and save dialog */ $display.= $output; session::set('conference',$conference); diff --git a/trunk/gosa-plugins/gofon/gofon/fonreports/main.inc b/trunk/gosa-plugins/gofon/gofon/fonreports/main.inc index cbd957edd..137169510 100644 --- a/trunk/gosa-plugins/gofon/gofon/fonreports/main.inc +++ b/trunk/gosa-plugins/gofon/gofon/fonreports/main.inc @@ -6,6 +6,10 @@ $lock_msg =""; if ( $cleanup ){ session::un_set('fonreport'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('fonreport'); + } /* Create fonreport object on demand */ if (!session::is_set('fonreport')){ diff --git a/trunk/gosa-plugins/gofon/gofon/macro/main.inc b/trunk/gosa-plugins/gofon/gofon/macro/main.inc index 8d4521ed3..1e038e90d 100644 --- a/trunk/gosa-plugins/gofon/gofon/macro/main.inc +++ b/trunk/gosa-plugins/gofon/gofon/macro/main.inc @@ -33,7 +33,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('macroManagement'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('macroManagement'); + } /* Create macroManagement object on demand */ if (!session::is_set('macroManagement')){ @@ -55,11 +58,6 @@ if ( $cleanup ){ $display= print_header(get_template_path('plugins/gofon/images/macros.png'), _("Phone macro management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('macroManagement'); - } - /* Show and save dialog */ $display.= $output; session::set('macroManagement',$macroManagement); diff --git a/trunk/gosa-plugins/goto/addons/goto/main.inc b/trunk/gosa-plugins/goto/addons/goto/main.inc index af6b0ab7e..0b1e937bb 100644 --- a/trunk/gosa-plugins/goto/addons/goto/main.inc +++ b/trunk/gosa-plugins/goto/addons/goto/main.inc @@ -34,7 +34,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('gotomasses'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('gotomasses'); + } /* Create gotomasses object on demand */ if (!session::is_set('gotomasses') || isset($_POST['reload_gotomass_data'])){ diff --git a/trunk/gosa-plugins/goto/admin/applications/main.inc b/trunk/gosa-plugins/goto/admin/applications/main.inc index 99a7a72c8..ac2228b52 100644 --- a/trunk/gosa-plugins/goto/admin/applications/main.inc +++ b/trunk/gosa-plugins/goto/admin/applications/main.inc @@ -33,7 +33,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('applicationManagement'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('applicationManagement'); + } /* Create applicationManagement object on demand */ if (!session::is_set('applicationManagement')){ @@ -50,11 +53,6 @@ if ( $cleanup ){ $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('applicationManagement'); - } - /* Show and save dialog */ $display.= $output; session::set('applicationManagement',$applicationManagement); diff --git a/trunk/gosa-plugins/goto/admin/devices/main.inc b/trunk/gosa-plugins/goto/admin/devices/main.inc index dd9d451fd..6983903be 100644 --- a/trunk/gosa-plugins/goto/admin/devices/main.inc +++ b/trunk/gosa-plugins/goto/admin/devices/main.inc @@ -33,6 +33,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('DeviceManagement'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('DeviceManagement'); + } /* Create DeviceManagement object on demand */ if (!session::is_set('DeviceManagement')){ @@ -51,11 +55,6 @@ if ( $cleanup ){ $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('DeviceManagement'); - } - /* Show and save dialog */ $display.= $output; session::set('DeviceManagement',$DeviceManagement); diff --git a/trunk/gosa-plugins/goto/admin/mimetypes/main.inc b/trunk/gosa-plugins/goto/admin/mimetypes/main.inc index cbd12a1cc..ef6fc5f35 100644 --- a/trunk/gosa-plugins/goto/admin/mimetypes/main.inc +++ b/trunk/gosa-plugins/goto/admin/mimetypes/main.inc @@ -32,6 +32,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('MimeTypeManagement'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('MimeTypeManagement'); + } /* Create MimeTypeManagement object on demand */ if (!session::is_set('MimeTypeManagement')){ @@ -50,11 +54,6 @@ if ( $cleanup ){ $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management")); } - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('MimeTypeManagement'); - } - /* Show and save dialog */ $display.= $output; session::set('MimeTypeManagement',$MimeTypeManagement); diff --git a/trunk/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc b/trunk/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc index 0edc38068..65f09124e 100644 --- a/trunk/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc +++ b/trunk/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc @@ -32,6 +32,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('ldif'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('ldif'); + } /* Create phonelist object on demand */ if (!session::is_set('ldif')){ diff --git a/trunk/gosa-plugins/log/addons/logview/main.inc b/trunk/gosa-plugins/log/addons/logview/main.inc index 13a811a7b..fb51d77a2 100644 --- a/trunk/gosa-plugins/log/addons/logview/main.inc +++ b/trunk/gosa-plugins/log/addons/logview/main.inc @@ -32,7 +32,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('log_tabs'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('log_tabs'); + } /* Create logview object on demand */ if (!session::is_set('log_tabs')){ diff --git a/trunk/gosa-plugins/mail/addons/mailqueue/main.inc b/trunk/gosa-plugins/mail/addons/mailqueue/main.inc index 3d9373875..03dbd5c3f 100644 --- a/trunk/gosa-plugins/mail/addons/mailqueue/main.inc +++ b/trunk/gosa-plugins/mail/addons/mailqueue/main.inc @@ -31,6 +31,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('mailqueue'); }else{ + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('sudoManagement'); + } /* Create mailqueue object on demand */ if (!session::is_set('mailqueue')){ diff --git a/trunk/gosa-plugins/sudo/admin/sudo/main.inc b/trunk/gosa-plugins/sudo/admin/sudo/main.inc index e30efdd7b..ebdcbcd27 100644 --- a/trunk/gosa-plugins/sudo/admin/sudo/main.inc +++ b/trunk/gosa-plugins/sudo/admin/sudo/main.inc @@ -35,7 +35,11 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('sudoManagement'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('sudoManagement'); + } + /* Create sudoManagement object on demand */ if (!session::is_set('sudoManagement')){ session::set('sudoManagement',new sudoManagement ($config, $ui)); @@ -56,12 +60,7 @@ if ( $cleanup ){ $display.= $output; - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('sudoManagement'); - } - - /* Show and save dialog */ + /* Show and save dialog */ session::set('sudoManagement',$sudoManagement); } diff --git a/trunk/gosa-plugins/systems/admin/systems/main.inc b/trunk/gosa-plugins/systems/admin/systems/main.inc index 81c52565a..22a756814 100644 --- a/trunk/gosa-plugins/systems/admin/systems/main.inc +++ b/trunk/gosa-plugins/systems/admin/systems/main.inc @@ -34,7 +34,10 @@ if ($remove_lock){ if ( $cleanup ){ session::un_set('systems'); }else{ - + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('systems'); + } /* Create usermanagement object on demand */ if (!session::is_set('systems')){ @@ -44,11 +47,6 @@ if ( $cleanup ){ $systems->save_object(); $output= $systems->execute(); - /* Reset requested? */ - if (isset($_GET['reset']) && $_GET['reset'] == 1){ - session::un_set ('systems'); - } - /* Page header*/ if (get_object_info() != ""){ $display= print_header(get_template_path($systems->plIcon), _("System management"), "\"\" ".LDAP::fix(get_object_info())); -- 2.30.2