Code

Added DNS and DHCP enable disable options into setup step 2
[gosa.git] / include / sieve / class_My_Tree.inc
index cc9600b6b4ecc9b247fa381aeb5ed888c8bc3d53..8ddafe2d46befaee65d94d2cb6be83d41b11dcf8 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-
-
 /* This class is inherited from the original 'Tree'
  *  class written by Heiko Hund.
  * It is partly rewritten to create a useable html interface 
@@ -23,11 +21,13 @@ class My_Tree extends Tree
     $this->_construct($root);
   }
 
+
   function execute()
   {
     return($this->dump());
   }
 
+
   /* Create a html interface for the current sieve filter 
    */
   function dump()
@@ -247,7 +247,7 @@ class My_Tree extends Tree
     }
 
     if(!isset($this->pap[$key_id])){
-      trigger_error(_("Can't remove element with object_id=".$key_id.", there is no object with this identifier. Remove aborted."));
+      trigger_error("Can't remove element with object_id=".$key_id.", there is no object with this identifier. Remove aborted.");
       return(false);
     }
 
@@ -722,6 +722,7 @@ function sieve_create_strings($data,$force_string = FALSE)
       $ret = preg_replace("/,$/","",trim($ret));
       $ret = "[".$ret."]";
     }
+      $ret = preg_replace("/\"\"/","\"",$ret);
   }else{
 
     $Multiline = preg_match("/\n/",$data);
@@ -753,7 +754,10 @@ function sieve_get_strings($data,$id)
     while(isset($data[$id]) && $data[$id]['class']  != "right-bracket" && $id < count($data)){
 
       if($data[$id]['class'] == "quoted-string"){
-        $ret[] = $data[$id]['text'];
+        $text = $data[$id]['text']; 
+        $text= preg_replace("/^\"/","",$text);
+        $text= preg_replace("/\"$/","",$text);
+        $ret[] = $text;
       }
 
       $id ++;