Code

Updated data handling in mime lists
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Apr 2010 09:51:37 +0000 (09:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Apr 2010 09:51:37 +0000 (09:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17544 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 29e40dedca7d8405cc9c0d89921f6766984105ab..7ca7c32309f39c019234fc9e783e8755bac63ece 100644 (file)
@@ -329,16 +329,24 @@ class mimetype extends plugin
   function save_object()
   {
       if(isset($_POST['MimeGeneric']) && !preg_match("/freeze/i",$this->FAIstate)){
-
-
+        
           // Act on list actions here
           $this->patternList->save_object();
           $this->applicationList->save_object();
           $this->embeddedList->save_object();
 
-          $this->use_gotoMimeFilePattern = array_values($this->patternList->getMaintainedData());
-          $this->use_gotoMimeApplication = array_values($this->applicationList->getMaintainedData());
-          $this->use_gotoMimeEmbeddedApplication = array_values($this->embeddedList->getMaintainedData());
+          $action=$this->patternList->getAction();
+          if(in_array($action['action'],array('delete', 'reorder'))){
+              $this->use_gotoMimeFilePattern = array_values($this->patternList->getMaintainedData());
+          }
+          $action=$this->applicationList->getAction();
+          if(in_array($action['action'],array('delete', 'reorder'))){
+              $this->use_gotoMimeApplication = array_values($this->applicationList->getMaintainedData());
+          }
+          $action=$this->embeddedList->getAction();
+          if(in_array($action['action'],array('delete', 'reorder'))){
+              $this->use_gotoMimeEmbeddedApplication = array_values($this->embeddedList->getMaintainedData());
+          }
 
       /* Create a base backup and reset the
          base directly after calling plugin::save_object();