old behavior "selected" should also be used for not set preference, therefore we need to test for !== '0'

This commit is contained in:
Ralf Becker 2016-10-04 09:54:21 +02:00
parent 3da08fa7a1
commit 4b2f08f5b7

View File

@ -100,7 +100,8 @@ class calendar_uiforms extends calendar_ui
}
if(is_array($owner))
{
if($this->cal_prefs['default_participant'] || count($participants) === 0 && count($owner) === 1)
// old behavior "selected" should also be used for not set preference, therefore we need to test for !== '0'
if($this->cal_prefs['default_participant'] !== '0' || count($extra_participants) === 0 && count($owner) === 1)
{
$extra_participants += $owner;
}
@ -113,7 +114,8 @@ class calendar_uiforms extends calendar_ui
}
else
{
$owner = !$this->cal_prefs['default_participant'] ? $this->user : $this->owner;
// old behavior "selected" should also be used for not set preference, therefore we need to test for === '0'
$owner = $this->cal_prefs['default_participant'] === '0' ? $this->user : $this->owner;
}
if (!$owner || !is_numeric($owner) || $GLOBALS['egw']->accounts->get_type($owner) != 'u' ||