Code

Udpated sieve Management.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 12 Jul 2007 13:40:37 +0000 (13:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 12 Jul 2007 13:40:37 +0000 (13:40 +0000)
Automatically include alternate addresses new sieve vacation objects

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6850 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveManagement.inc

index 4ac2c75fe3a4f38756259679a57b84280dd8c61f..90b4b54efc1abed34864ce5db604017247889de5 100644 (file)
@@ -796,6 +796,15 @@ class sieveManagement extends plugin
       $ele[] = new sieve_block_end(NULL,preg_replace("/[^0-9]/","",microtime()),$parent);
       $ele[] = new $this->add_element_type(NULL, preg_replace("/[^0-9]/","",microtime()),$parent);
       $ele[] = new sieve_block_start(NULL,preg_replace("/[^0-9]/","",microtime()),$parent);
+    }elseif($this->add_element_type == "sieve_vacation"){
+
+      /* Automatically add addresses to sieve alternate addresses */
+      $data = NULL;
+      $tmp = new $this->add_element_type($data, preg_replace("/[^0-9]/","",microtime()),$parent);
+      if(isset($this->parent->gosaMailAlternateAddress)){
+        $tmp->addresses = $this->parent->gosaMailAlternateAddress;
+      }
+      $ele[] = $tmp ;
     }else{
       $ele[] = new $this->add_element_type(NULL, preg_replace("/[^0-9]/","",microtime()),$parent);
     }