mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Fix calendar ignore conflict when the conflict is not from resources
This commit is contained in:
parent
384756ff71
commit
e9a3d69e46
@ -1780,6 +1780,7 @@ class calendar_uiforms extends calendar_ui
|
||||
function conflicts($event,$conflicts,$preserv)
|
||||
{
|
||||
$etpl = CreateObject('etemplate.etemplate_new','calendar.conflicts');
|
||||
$allConflicts = array();
|
||||
|
||||
foreach($conflicts as $k => $conflict)
|
||||
{
|
||||
@ -1795,6 +1796,7 @@ class calendar_uiforms extends calendar_ui
|
||||
'icon_recur' => $conflict['recur_type'] != MCAL_RECUR_NONE ? 'recur' : '',
|
||||
'text_recur' => $conflict['recur_type'] != MCAL_RECUR_NONE ? lang('Recurring event') : ' ',
|
||||
);
|
||||
$allConflicts += array_intersect_key($conflict['participants'],$event['participants']);
|
||||
}
|
||||
$content = $event + array(
|
||||
'conflicts' => array_values($conflicts), // conflicts have id-start as key
|
||||
@ -1802,7 +1804,10 @@ class calendar_uiforms extends calendar_ui
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('Scheduling conflict');
|
||||
$resources_config = config::read('resources');
|
||||
$readonlys = array();
|
||||
if($event['participant_types']['r'] && $resources_config) // resources Allow ignore conflicts
|
||||
|
||||
foreach (array_keys($allConflicts) as $pId)
|
||||
{
|
||||
if(substr($pId,0,1) == 'r' && $resources_config ) // resources Allow ignore conflicts
|
||||
{
|
||||
|
||||
switch ($resources_config['ignoreconflicts'])
|
||||
@ -1814,19 +1819,13 @@ class calendar_uiforms extends calendar_ui
|
||||
$readonlys['button[ignore]'] = false;
|
||||
break;
|
||||
default:
|
||||
foreach ($event['participants'] as $pIds => $val)
|
||||
{
|
||||
if ($val != 'ACHAIR')
|
||||
{
|
||||
if (!$this->bo->check_status_perms($pIds, $event))
|
||||
if (!$this->bo->check_status_perms($pId, $event))
|
||||
{
|
||||
$readonlys['button[ignore]'] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$etpl->exec('calendar.calendar_uiforms.process_edit',$content,array(),$readonlys,array_merge($event,$preserv),$preserv['no_popup'] ? 0 : 2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user