Code

Updated indentification attribute used for sieve login.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Mar 2007 07:00:19 +0000 (07:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Mar 2007 07:00:19 +0000 (07:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5909 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveManagement.inc
plugins/personal/mail/class_mailAccount.inc

index be2ef4ed93186acec0ffbf64bfe82fc5a4de5d48..0ac0afe15bac35f51bab7b5547200ba86b3c5ce4 100644 (file)
@@ -31,7 +31,7 @@ class sieveManagement extends plugin
 {
   var $parent = NULL;
   var $scripts= array();  
-
+  var $uattrib = "uid";
   var $current_script  = -1;
   var $current_handler = NULL;
   var $script_to_delete =-1;
@@ -58,8 +58,9 @@ class sieveManagement extends plugin
   /* Initialize the class and load all sieve scripts 
    *  try to parse them and display errors 
    */ 
-  function sieveManagement($config,$dn,$parent)
+  function sieveManagement($config,$dn,$parent,$uattrib)
   {
+    $this->uattrib = $uattrib;
     $this->parent = $parent;
     plugin::plugin($config,$dn);
 
@@ -133,11 +134,13 @@ class sieveManagement extends plugin
       $cfg=  $this->config->data['SERVERS']['IMAP'][$this->parent->gosaMailServer];
       $this->Sieve_Error = "";
 
+      $uattrib = $this->uattrib;
+
       /* Log into the mail server */
       $this->sieve_handle= new sieve(
           $cfg["sieve_server"], 
           $cfg["sieve_port"], 
-          $this->parent->uid
+          $this->parent->$uattrib
           $cfg["password"], 
           $cfg["admin"]);
 
index ff796593ea991926123fa94c8f80c61f3ff0a3e6..289e15420bcdd9ea9ac6e891866f64aacbe80cce 100644 (file)
@@ -241,7 +241,11 @@ class mailAccount extends plugin
     if(isset($_POST['sieveManagement']) 
         && preg_match("/C/",$this->gosaMailDeliveryMode)
         && $this->acl_is_writeable("sieveManagement")) {
-      $this->dialog = new sieveManagement($this->config,$this->dn,$this);
+
+        $method = new $this->method($this->config);
+        $id     = $method->uattrib;
+
+      $this->dialog = new sieveManagement($this->config,$this->dn,$this,$id);
     }
    
     /* Cancel sieve edit */