From 86ac71ea2ea7ff7e941d052669f07b90ab8f1597 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 17 May 2022 17:15:20 +0200 Subject: [PATCH] Move the Kolab Contacts Suggestions test to be IMAP Contacts Suggestions --- .../ImapContactsSuggestions.php} | 10 ++-------- .../{kolab => imap-contacts-suggestions}/LICENSE | 0 .../{kolab => imap-contacts-suggestions}/index.php | 14 +++++++------- 3 files changed, 9 insertions(+), 15 deletions(-) rename plugins/{kolab/KolabContactsSuggestions.php => imap-contacts-suggestions/ImapContactsSuggestions.php} (76%) rename plugins/{kolab => imap-contacts-suggestions}/LICENSE (100%) rename plugins/{kolab => imap-contacts-suggestions}/index.php (61%) diff --git a/plugins/kolab/KolabContactsSuggestions.php b/plugins/imap-contacts-suggestions/ImapContactsSuggestions.php similarity index 76% rename from plugins/kolab/KolabContactsSuggestions.php rename to plugins/imap-contacts-suggestions/ImapContactsSuggestions.php index 5c36f4709..78fc40f65 100644 --- a/plugins/kolab/KolabContactsSuggestions.php +++ b/plugins/imap-contacts-suggestions/ImapContactsSuggestions.php @@ -1,9 +1,9 @@ ImapClient(); - $metadata = $oImapClient->FolderGetMetadata($this->sFolderName, [\MailSo\Imap\Enumerations\MetadataKeys::KOLAB_CTYPE]); - if ($metadata && 'contact' !== \array_shift($metadata)) { - // Throw error -// $oImapClient->FolderList() : array - return []; - } $oImapClient->FolderSelect($this->sFolderName); $sQuery = \MailSo\Imap\SearchCriterias::escapeSearchString($oImapClient, $sQuery); diff --git a/plugins/kolab/LICENSE b/plugins/imap-contacts-suggestions/LICENSE similarity index 100% rename from plugins/kolab/LICENSE rename to plugins/imap-contacts-suggestions/LICENSE diff --git a/plugins/kolab/index.php b/plugins/imap-contacts-suggestions/index.php similarity index 61% rename from plugins/kolab/index.php rename to plugins/imap-contacts-suggestions/index.php index 1d78c263c..54e1b576e 100644 --- a/plugins/kolab/index.php +++ b/plugins/imap-contacts-suggestions/index.php @@ -1,13 +1,13 @@ Config()->Get('plugin', 'mailbox', '')); +// $sFolder = \trim($this->Config()->Get('plugin', 'mailbox', 'INBOX')); // if ($sFolder) { - include_once __DIR__ . '/KolabContactsSuggestions.php'; - $mResult[] = new KolabContactsSuggestions(); + include_once __DIR__ . '/ImapContactsSuggestions.php'; + $mResult[] = new ImapContactsSuggestions(); // } } }