Code

Mailmethod, Cyrus tries to connect, without any information, this will cause some...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 11:57:45 +0000 (11:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 11:57:45 +0000 (11:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@543 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_mail-methods-cyrus.inc

index d8b7a184e8be5bf581677494f25188721ed63073..15c3c53c3a8fc128654e31136942f831f6cdea8d 100644 (file)
@@ -31,6 +31,7 @@ class mailMethodCyrus extends mailMethod
 
   function connect($gosaMailServer)
   {
+    $cfg=array();
     /* Connect to IMAP server. I don't want to see these warning here... */
     $this->gosaMailServer= $gosaMailServer;
     if (!isset($this->config[$gosaMailServer])){
@@ -38,8 +39,11 @@ class mailMethodCyrus extends mailMethod
     } else {
       $cfg= $this->config[$gosaMailServer];
     }
-
     /* For some reason, hiding errors with @ does not wor here... */
+    if(!isset($cfg['connect']))   $cfg['connect']="";
+    if(!isset($cfg['admin']))     $cfg['admin']="";
+    if(!isset($cfg['password']))  $cfg['password']="";
+
     $this->mbox = @imap_open($cfg['connect'], $cfg['admin'], $cfg['password'], OP_HALFOPEN);
 
     /* Mailbox reachable? */
@@ -68,7 +72,7 @@ class mailMethodCyrus extends mailMethod
         $result['quotaUsage']=    $quota_value["STORAGE"]['usage'];
         $result['gosaMailQuota']= $quota_value["STORAGE"]['limit'];
       } else {
-        /* backward compatible */
+        /* backward icompatible */
         $result['quotaUsage']=    $quota_value['usage'];
         $result['gosaMailQuota']= $quota_value['limit'];
       }