index 0cd0e15be64829935b1086e24253cfb146265ae5..c0606046b0c9094667c53e70d3b0bd4cc58b6d13 100644 (file)
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
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
{
class mailMethodKolab extends mailMethodCyrus
{
"gosaMailQuota" => "cyrus-userquota",
"gosaMailServer" => "kolabHomeServer");
"gosaMailQuota" => "cyrus-userquota",
"gosaMailServer" => "kolabHomeServer");
- function mailMethodKolab($config)
+ function mailMethodKolab(&$config)
{
$this->config= $config->data['SERVERS']['IMAP'];
}
{
$this->config= $config->data['SERVERS']['IMAP'];
}
return(false);
}
return(false);
}
- error_reporting(E_ALL);
+ error_reporting(E_ALL | E_STRICT);
return ($result);
}
return ($result);
}
$mailObject->attrs[$dest]= $mailObject->attrs[$source];
$mailObject->$dest= $mailObject->attrs[$source];
$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]);
}
unset ($mailObject->$dest['count']);
unset ($mailObject->attrs[$source]);
}
}
/* Save shared folder target */
}
/* 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.
/* 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.
}
}
}
}
+
+ 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:
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: