alecpl
2009-09-08 d168b9909acc66510bd24b3e74f6828f47939f75
plugins/managesieve/lib/rcube_sieve.php
@@ -117,7 +117,7 @@
          $script = $this->_convert_from_squirrel_rules($script);
          $this->script = new rcube_sieve_script($script);
          $this->script = new rcube_sieve_script($script, $this->disabled);
       
          $this->save();
@@ -184,7 +184,7 @@
    * @param  string  Script's text content
    * @param  array   Disabled extensions
    */
  public function __construct($script, $disabled)
  public function __construct($script, $disabled=NULL)
    {
      if (!empty($disabled))
        foreach ($disabled as $ext)
@@ -442,7 +442,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 +454,7 @@
          'join' => $join,
       );
   }
      return $result;
    }