Merge branch 'the-djmaze:master' into rework-on-mailaddress-handling

This commit is contained in:
cm-schl 2023-02-15 12:26:35 +01:00 committed by GitHub
commit aa03e84c79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 972 additions and 1018 deletions

View file

@ -133,12 +133,16 @@ class KolabAddressBook implements \RainLoop\Providers\AddressBook\AddressBookInt
$oParams->iLimit = 999; // Is the max
$oMessageList = $this->MailClient()->MessageList($oParams);
foreach ($oMessageList as $oMessage) {
if ($rCsv) {
$oContact = $this->MessageAsContact($oMessage);
\RainLoop\Providers\AddressBook\Utils::VCardToCsv($rCsv, $oContact, $bCsvHeader);
$bCsvHeader = false;
} else if ($xCard = $this->fetchXCardFromMessage($oMessage)) {
echo $xCard->serialize();
try {
if ($rCsv) {
$oContact = $this->MessageAsContact($oMessage);
\RainLoop\Providers\AddressBook\Utils::VCardToCsv($rCsv, $oContact->vCard, $bCsvHeader);
$bCsvHeader = false;
} else if ($xCard = $this->fetchXCardFromMessage($oMessage)) {
echo $xCard->serialize();
}
} catch (\Throwable $oExc) {
$this->oLogger && $this->oLogger->WriteException($oExc);
}
}
}
@ -156,7 +160,7 @@ class KolabAddressBook implements \RainLoop\Providers\AddressBook\AddressBookInt
return false;
}
$id = $oContact->id;
$id = \intval($oContact->id);
$sUID = '';
$oVCard = $oContact->vCard;

View file

@ -4,11 +4,11 @@ class KolabPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Kolab',
VERSION = '2.5',
RELEASE = '2023-01-17',
VERSION = '2.6',
RELEASE = '2023-02-10',
CATEGORY = 'Contacts',
DESCRIPTION = 'Use an Address Book of Kolab.',
REQUIRED = '2.24.6';
REQUIRED = '2.26.0';
public function Init() : void
{

View file

@ -4,8 +4,8 @@ class LoginOverridePlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Login Override',
VERSION = '2.1',
RELEASE = '2023-02-01',
VERSION = '2.2',
RELEASE = '2023-02-08',
REQUIRED = '2.25.3',
CATEGORY = 'Filters',
DESCRIPTION = 'Override IMAP/SMTP login credentials for specific users.';
@ -22,7 +22,7 @@ class LoginOverridePlugin extends \RainLoop\Plugins\AbstractPlugin
$sMapping = \trim($this->Config()->Get('plugin', 'email_mapping', ''));
if (!empty($sMapping)) {
$aList = \preg_split('/\\R/', $sMapping);
foreach ($aList as $line) {
foreach ($aList as $sLine) {
$aData = \explode(':', $sLine, 2);
if (!empty($aData[1]) && $sEmail === \trim($aData[0])) {
$sEmail = \trim($aData[1]);