From: hickert Date: Tue, 31 May 2005 11:57:45 +0000 (+0000) Subject: Mailmethod, Cyrus tries to connect, without any information, this will cause some... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=41b08de5a81b22efc11345f4a69c5d116389c7fe;p=gosa.git Mailmethod, Cyrus tries to connect, without any information, this will cause some errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@543 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_mail-methods-cyrus.inc b/include/class_mail-methods-cyrus.inc index d8b7a184e..15c3c53c3 100644 --- a/include/class_mail-methods-cyrus.inc +++ b/include/class_mail-methods-cyrus.inc @@ -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']; }