Code

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

gosa-core/plugins/admin/departments/main.inc

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