mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Fix specifying owner as an array quietly failed
This commit is contained in:
parent
f87c905777
commit
2b6eacd472
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user