mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
fixing calender empty resource problem (add event, edit participants)
This commit is contained in:
parent
de4f3d6b87
commit
4e8cb642ab
@ -286,7 +286,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
if ($app != 'addressbook' || !($data = $GLOBALS['egw']->accounts->name2id($id,'person_id')))
|
if ($app != 'addressbook' || !($data = $GLOBALS['egw']->accounts->name2id($id,'person_id')))
|
||||||
{
|
{
|
||||||
$quantity = $content['participants']['quantity'] ? $content['participants']['quantity'] : 1;
|
$quantity = $content['participants']['quantity'] ? $content['participants']['quantity'] : 1;
|
||||||
if ($app == "resources" && $id) {
|
if ($app == "resources" && !empty($id)) {
|
||||||
$bores =& CreateObject('resources.bo_resources');
|
$bores =& CreateObject('resources.bo_resources');
|
||||||
$selectedres = $bores->read($id);
|
$selectedres = $bores->read($id);
|
||||||
$cats = $bores->acl->get_cats(EGW_ACL_DIRECT_BOOKING);
|
$cats = $bores->acl->get_cats(EGW_ACL_DIRECT_BOOKING);
|
||||||
@ -305,9 +305,15 @@ class calendar_uiforms extends calendar_ui
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$status = isset($this->bo->resources[$type]['new_status']) ? ExecMethod($this->bo->resources[$type]['new_status'],$id) : 'U';
|
if ($uid && $id)
|
||||||
if ($uid) $event['participants'][$uid] = $event['participant_types'][$type][$id] =
|
{
|
||||||
$status.((int) $quantity > 1 ? (int)$quantity : '');
|
$status = isset($this->bo->resources[$type]['new_status']) ? ExecMethod($this->bo->resources[$type]['new_status'],$id) : 'U';
|
||||||
|
$event['participants'][$uid] = $event['participant_types'][$type][$id] = $status.((int) $quantity > 1 ? (int)$quantity : '');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset($quantity);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// fall-through for accounts entered as contact
|
// fall-through for accounts entered as contact
|
||||||
|
Loading…
Reference in New Issue
Block a user