Code

+ Move reset handling before object creation, otherwise no
[gosa.git] / trunk / gosa-plugins / goto / admin / devices / main.inc
index dd9d451fd88807f4de3744fcf92a328688f0d015..6983903be2d25f8edcf5ae05cfd87fa1f45f4346 100644 (file)
@@ -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);