alecpl
2009-10-06 ffeab7fe7e0ccf1d458d6a863600359c38769950
plugins/managesieve/lib/rcube_sieve.php
@@ -264,9 +264,10 @@
    {
      $script = '';
      $exts = array();
      $idx = 0;
      
      // rules
      foreach ($this->content as $idx => $rule)
      foreach ($this->content as $rule)
        {
     $extension = '';
     $tests = array();
@@ -367,7 +368,8 @@
       }
     
     $script .= "}\n";
     $idx++;
     if ($extension && !isset($exts[$extension]))
       $exts[$extension] = $extension;
   }
@@ -442,7 +444,7 @@
    {
      $result = NULL;
    
      if (preg_match('/^(if|elsif|else)\s+((allof|anyof|exists|header|not|size)\s+(.*))\s+\{(.*)\}$/sm', trim($content), $matches))
      if (preg_match('/^(if|elsif|else)\s+((true|not\s+true|allof|anyof|exists|header|not|size)(.*))\s+\{(.*)\}$/sm', trim($content), $matches))
        {
     list($tests, $join) = $this->_parse_tests(trim($matches[2]));
     $actions = $this->_parse_actions(trim($matches[5]));
@@ -454,7 +456,7 @@
          'join' => $join,
       );
   }
      return $result;
    }