Code

Fixed mode switch
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 Mar 2007 11:16:52 +0000 (11:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 Mar 2007 11:16:52 +0000 (11:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5787 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveManagement.inc

index e16bbdce6bab75192520240447e5b0c21dbc3a3b..0bf128d216c0566b0b5ad79df7f28f4de21f0b39 100644 (file)
@@ -386,6 +386,18 @@ class sieveManagement extends plugin
           }
         }
       }
+      if(in_array($Mode,array("Structured"))){
+        $this->current_handler->save_object();
+        $sc = $this->current_handler->get_sieve_script();
+        $this->scripts[$this->current_script]['SCRIPT'] = $sc;
+        $p = new My_Parser;
+        if($p -> parse($sc)){
+          $this->current_handler = $p;
+        } else {
+          print_red($p->status_text);
+          $skip_mode_change = TRUE;
+        }
+      }
       if(!$skip_mode_change){
         if($this->scripts[$this->current_script]['MODE'] != "Source-Only"){
           if(isset($_POST['View_Source'])){