From 2e3f163e609aae60127c5bff2e4b389e13aa218a Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 May 2020 11:40:08 -0600 Subject: [PATCH] * Infolog: Add 'None' option for Infolog types to sync preference --- infolog/inc/class.infolog_groupdav.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_groupdav.inc.php b/infolog/inc/class.infolog_groupdav.inc.php index e05605f213..10e89b46b9 100644 --- a/infolog/inc/class.infolog_groupdav.inc.php +++ b/infolog/inc/class.infolog_groupdav.inc.php @@ -106,7 +106,14 @@ class infolog_groupdav extends Api\CalDAV\Handler */ private function get_infolog_filter($path, $user) { - if (!($infolog_types = $GLOBALS['egw_info']['user']['preferences']['groupdav']['infolog-types'])) + $infolog_types = $GLOBALS['egw_info']['user']['preferences']['groupdav']['infolog-types']; + + // 'None' selected for types, make sure filter gives no results + if($infolog_types == '0') + { + return array('info_type' => '**NONE**'); + } + if (!$infolog_types) { $infolog_types = 'task'; } @@ -872,7 +879,7 @@ class infolog_groupdav extends Api\CalDAV\Handler 'label' => 'InfoLog types to sync', 'name' => 'infolog-types', 'help' => 'Which InfoLog types should be synced with the device, default only tasks.', - 'values' => $types, + 'values' => array('0' => lang('none')) + $types, 'default' => 'task', 'xmlrpc' => True, 'admin' => False,