Code

fixed plugin handling in case of GET_[reset]
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Sep 2010 13:39:02 +0000 (13:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Sep 2010 13:39:02 +0000 (13:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19633 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/mimetypes/main.inc

index 1efd944a478d0bf6d6a8bf9541545ed9e8da8850..210956c5cb4bc95f184ebd2aab8b95ed4c256681 100644 (file)
  */
 
 /* Remove locks created by this plugin
-*/
+ */
 if ($remove_lock){
-  if(session::is_set('mimetypeManagement')){
-      $macl = session::get('mimetypeManagement');
-      $macl->remove_lock();
-  }
+    if(session::is_set('mimetypeManagement')){
+        $macl = session::get('mimetypeManagement');
+        $macl->remove_lock();
+        session::un_set('mimetypeManagement');
+    }
 }
 
 /* Remove this plugin from session
-*/
+ */
 if ( $cleanup ){
-  session::un_set('mimetypeManagement');
+    session::un_set('mimetypeManagement');
 }else{
 
-  /* Create mimetypemanagement object on demand */
-  if (!session::is_set('mimetypeManagement')){
-    $mimetypeManagement= new mimetypeManagement ($config, $ui);
-    session::set('mimetypeManagement',$mimetypeManagement);
-  }
-  $mimetypeManagement = session::get('mimetypeManagement');
-  $display= $mimetypeManagement->execute();
+    /* Create mimetypemanagement object on demand */
+    if (!session::is_set('mimetypeManagement')){
+        $mimetypeManagement= new mimetypeManagement ($config, $ui);
+        session::set('mimetypeManagement',$mimetypeManagement);
+    }
+    $mimetypeManagement = session::get('mimetypeManagement');
+    $display= $mimetypeManagement->execute();
 
-  /* Reset requested? */
-  if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    session::un_set ('mimetypeManagement');
-  }
+    /* Reset requested? */
+    if (isset($_GET['reset']) && $_GET['reset'] == 1){
+        session::un_set ('mimetypeManagement');
+    }
 
-  /* Show and save dialog */
-  session::set('mimetypeManagement',$mimetypeManagement);
+    /* Show and save dialog */
+    session::set('mimetypeManagement',$mimetypeManagement);
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: