mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-07 14:39:43 +01:00
old behavior "selected" should also be used for not set preference, therefore we need to test for !== '0'
This commit is contained in:
parent
fbada034dd
commit
50270c0994
@ -77,7 +77,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
*/
|
*/
|
||||||
function &default_add_event()
|
function &default_add_event()
|
||||||
{
|
{
|
||||||
$extra_participants = $_GET['participants'] ?
|
$extra_participants = $_GET['participants'] ?
|
||||||
(!is_array($_GET['participants']) ? explode(',',$_GET['participants']) : $_GET['participants']) :
|
(!is_array($_GET['participants']) ? explode(',',$_GET['participants']) : $_GET['participants']) :
|
||||||
array();
|
array();
|
||||||
|
|
||||||
@ -100,7 +100,8 @@ class calendar_uiforms extends calendar_ui
|
|||||||
}
|
}
|
||||||
if(is_array($owner))
|
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;
|
$extra_participants += $owner;
|
||||||
}
|
}
|
||||||
@ -113,7 +114,8 @@ class calendar_uiforms extends calendar_ui
|
|||||||
}
|
}
|
||||||
else
|
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;
|
||||||
}
|
}
|
||||||
error_log(__METHOD__ . ' owner: ' . array2string($owner));
|
error_log(__METHOD__ . ' owner: ' . array2string($owner));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user