From 4b2f08f5b739126f388face7c23f4eda4afd9cf2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 4 Oct 2016 09:54:21 +0200 Subject: [PATCH] old behavior "selected" should also be used for not set preference, therefore we need to test for !== '0' --- calendar/inc/class.calendar_uiforms.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 53fb79784a..83ef671bed 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -77,7 +77,7 @@ class calendar_uiforms extends calendar_ui */ function &default_add_event() { - $extra_participants = $_GET['participants'] ? + $extra_participants = $_GET['participants'] ? (!is_array($_GET['participants']) ? explode(',',$_GET['participants']) : $_GET['participants']) : array(); @@ -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' ||