From f277f5c0060a0523cbffa4f6f145e9b5a90ba1db Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 18 Oct 2022 11:20:15 +0200 Subject: [PATCH] Don't list Collected Recipients and Trusted Senders as options for the birthdays calendar --- plugins/calendar/calendar.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 56a8df2d..83926a18 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -777,6 +777,13 @@ $("#rcmfd_new_category").keypress(function(event) { $checkbox = new html_checkbox(['name' => '_birthday_adressbooks[]'] + $input_attrib); foreach ($this->rc->get_address_sources(false, true) as $source) { + // Roundcube >= 1.5, Ignore Collected Recipients and Trusted Senders sources + if ((defined('rcube_addressbook::TYPE_RECIPIENT') && $source['id'] == (string) rcube_addressbook::TYPE_RECIPIENT) + || (defined('rcube_addressbook::TYPE_TRUSTED_SENDER') && $source['id'] == (string) rcube_addressbook::TYPE_TRUSTED_SENDER) + ) { + continue; + } + $active = in_array($source['id'], (array) $this->rc->config->get('calendar_birthday_adressbooks')) ? $source['id'] : ''; $sources[] = html::tag('li', null, html::label(null,