Calendar/PM integration: now can show projects in calendar by multiple custom date fields

This commit is contained in:
nathan 2023-10-16 11:30:32 -06:00
parent e917514713
commit f7e6155b57
2 changed files with 4 additions and 4 deletions

View File

@ -787,7 +787,7 @@ class calendar_ui
$event['non_blocking'] = (bool)$event['non_blocking']; $event['non_blocking'] = (bool)$event['non_blocking'];
$matches = null; $matches = null;
if(!(int)$event['id'] && preg_match('/^([a-z_-]+)([0-9]+)$/i',$event['id'],$matches)) if(!(int)$event['id'] && preg_match('/^([a-z_-]+)([0-9]+)([:-].+)?$/i', $event['id'], $matches))
{ {
$app = $matches[1]; $app = $matches[1];
$app_id = $matches[2]; $app_id = $matches[2];

View File

@ -456,7 +456,7 @@ class calendar_uilist extends calendar_ui
} }
$matches = null; $matches = null;
if(!(int)$event['id'] && preg_match('/^([a-z_-]+)([0-9]+)$/i',$event['id'],$matches)) if(!(int)$event['id'] && preg_match('/^([a-z_-]+)([0-9]+)([:-].+)?$/i', $event['id'], $matches))
{ {
$app = $matches[1]; $app = $matches[1];
$app_id = $matches[2]; $app_id = $matches[2];
@ -474,14 +474,14 @@ class calendar_uilist extends calendar_ui
else else
{ {
$is_private = !$this->bo->check_perms(Acl::READ,$event); $is_private = !$this->bo->check_perms(Acl::READ,$event);
$event['app'] = 'calendar';
$event['app_id'] = $event['id'];
} }
if ($is_private) if ($is_private)
{ {
$event['class'] .= 'rowNoView '; $event['class'] .= 'rowNoView ';
} }
$event['app'] = 'calendar';
$event['app_id'] = $event['id'];
// Edit link // Edit link
if($app && $app_id) if($app && $app_id)