Code

Abort button for sieve edit should work now;
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 19 Mar 2007 10:12:55 +0000 (10:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 19 Mar 2007 10:12:55 +0000 (10:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5815 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveManagement.inc

index ad8b63ae5f43a0468addf8f2ef47c1f6e9d81560..f530cef29612ca65f752d5443cd6e03ebb38f876 100644 (file)
@@ -262,6 +262,7 @@ class sieveManagement extends plugin
 
         $this->current_script = $script;
         $this->current_handler = $this->scripts[$script]['PARSER'];
+        $this->scripts[$script]['SCRIPT_BACKUP'] = $this->scripts[$script]['SCRIPT'];
       }
 
       /* remove script requested */
@@ -361,6 +362,9 @@ class sieveManagement extends plugin
 
     /* Abort saving */
     if(isset($_POST['cancel_sieve_changes'])){
+      $tmp = $this->scripts[$this->current_script]['SCRIPT_BACKUP'];
+      $this->scripts[$this->current_script]['SCRIPT'] = $tmp;
+      $this->scripts[$this->current_script]['PARSER']->parse($tmp);
       $this->current_handler = NULL;
     }