Improved Kolab detection

This commit is contained in:
the-djmaze 2022-05-18 22:51:32 +02:00
parent ea5224c7e3
commit d93a31dda0
2 changed files with 32 additions and 36 deletions

View file

@ -4,10 +4,10 @@ class KolabPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Kolab',
VERSION = '0.1',
RELEASE = '2022-05-13',
CATEGORY = 'Security',
DESCRIPTION = 'Get contacts suggestions from Kolab.',
VERSION = '0.2',
RELEASE = '2022-05-18',
CATEGORY = 'Contacts',
DESCRIPTION = 'Use an Address Book of Kolab.',
REQUIRED = '2.15.4';
public function Init() : void
@ -82,8 +82,11 @@ class KolabPlugin extends \RainLoop\Plugins\AbstractPlugin
}
*/
if ('address-book' === $sName) {
require_once __DIR__ . '/KolabAddressBook.php';
$mResult = new KolabAddressBook();
$sFolderName = $this->Settings()->GetConf('KolabContactFolder', '');
if ($sFolderName) {
require_once __DIR__ . '/KolabAddressBook.php';
$mResult = new KolabAddressBook($sFolderName);
}
}
}
}