From 23e7dc3e08de56dcb88e1a6f4156961c8eeb37a8 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 8 Apr 2010 09:51:37 +0000 Subject: [PATCH] Updated data handling in mime lists git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17544 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/mimetypes/class_mimetypeGeneric.inc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc index 29e40dedc..7ca7c3230 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc @@ -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(); -- 2.30.2