diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 54c6afa84b..b8617a22c0 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -304,7 +304,7 @@ class calendar_ui if ($state == 'owner') { // only change the owners of the same resource-type as given in set_state[owner] - $set_owners = explode(',',$set_states['owner']); + $set_owners = is_array($set_states['owner']) ? $set_states['owner'] : explode(',',$set_states['owner']); if ((string)$set_owners[0] === '0') // set exactly the specified owners (without the 0) { if ($set_states['owner'] === '0,r0') // small fix for resources diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 3d543154e9..6302248433 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -96,10 +96,14 @@ class calendar_uiforms extends calendar_ui { if ($owner) // make an owner who is no user or we have no add-rights a participant { + if(!is_array($owner)) + { + $owner = explode(',',$owner); + } // if we come from ressources we don't need any users selected in calendar if (!isset($_GET['participants']) || $_GET['participants'][0] != 'r') { - foreach(explode(',',$owner) as $uid) + foreach($owner as $uid) { // only add users or a single ressource, not all ressources displayed by a category if (is_numeric($uid) || $owner == $uid)