Code

Updated management class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 27 Nov 2009 17:03:34 +0000 (17:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 27 Nov 2009 17:03:34 +0000 (17:03 +0000)
-Allows to save dingle dialogs too

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14843 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_management.inc

index 324da97b09a3aa70235408fe1302c88d76f1a61c..59a848199df94fa10ceb6e41104d456971470205 100644 (file)
@@ -593,7 +593,14 @@ class management
      *     }
      *   }
      * }
-     **/ 
+     **/
+
+    // Do not create a new tabObject while there is already one opened,
+    //  the user may have just pressed F5 to reload the page.
+    if(is_object($this->tabObject)){
+      return;
+    }
     $tabType = $this->tabType;
     $tabClass = $this->tabClass;
     $aclCategory = $this->aclCategory;
@@ -680,6 +687,18 @@ class management
         $this->remove_lock();
         $this->closeDialogs();
       }
+    }elseif($this->dialogObject instanceOf plugin){
+      $this->dialogObject->save_object();
+      $msgs = $this->dialogObject->check();
+      if(count($msgs)){
+        msg_dialog::displayChecks($msgs); 
+        return("");
+      }else{
+        $this->dialogObject->save();
+        @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dns,"Entry saved!");
+        $this->remove_lock();
+        $this->closeDialogs();
+      }
     }
   }