X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_mail-methods-kolab.inc;h=c0606046b0c9094667c53e70d3b0bd4cc58b6d13;hb=5ac46e680e92e8e585e88560985ca46d8211a4b8;hp=0cd0e15be64829935b1086e24253cfb146265ae5;hpb=e611f2632c1357369daaec0b002d11bcde257e5c;p=gosa.git diff --git a/include/class_mail-methods-kolab.inc b/include/class_mail-methods-kolab.inc index 0cd0e15be..c0606046b 100644 --- a/include/class_mail-methods-kolab.inc +++ b/include/class_mail-methods-kolab.inc @@ -17,7 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -require_once("class_mail-methods-cyrus.inc"); class mailMethodKolab extends mailMethodCyrus { @@ -30,7 +29,7 @@ class mailMethodKolab extends mailMethodCyrus "gosaMailQuota" => "cyrus-userquota", "gosaMailServer" => "kolabHomeServer"); - function mailMethodKolab($config) + function mailMethodKolab(&$config) { $this->config= $config->data['SERVERS']['IMAP']; } @@ -73,7 +72,7 @@ class mailMethodKolab extends mailMethodCyrus return(false); } - error_reporting(E_ALL); + error_reporting(E_ALL | E_STRICT); return ($result); } @@ -101,6 +100,12 @@ class mailMethodKolab extends mailMethodCyrus $mailObject->attrs[$dest]= $mailObject->attrs[$source]; $mailObject->$dest= $mailObject->attrs[$source]; + /* Ensure that cleanup will recognize the ampped attributes too */ + if(isset($mailObject->saved_attributes)){ + $mailObject->saved_attributes[$dest] = $mailObject->attrs[$source]; + $mailObject->saved_attributes[$source] = $mailObject->attrs[$source]; + } + unset ($mailObject->$dest['count']); unset ($mailObject->attrs[$source]); } @@ -204,7 +209,7 @@ class mailMethodKolab extends mailMethodCyrus } /* Save shared folder target */ - $mailObject->attrs['gosaSharedFolderTarget']= "kolab+shared.".$mailObject->uid; + $mailObject->attrs['gosaSharedFolderTarget']= "kolab+shared.".$mailObject->mail; /* Kolab shared folder names are like ' shared.uid@server.de ' So overwrite uid to match these folder names. Else we can't read quota settings etc. @@ -246,6 +251,16 @@ class mailMethodKolab extends mailMethodCyrus } } + + function deleteMailbox($folder) + { + /* Remove shared folders and skip removing users. + KolabD is not able to remove shared folders yet, so we do it instead */ + if(preg_match("/^shared/",$folder)){ + return mailMethodCyrus::deleteMailbox($folder); + } + return (TRUE); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: