new: [feed] Added unpublish_event setting to ensure pulled events are in the unpublished state

pull/9677/head
Sami Mokaddem 2024-04-08 14:48:04 +02:00
parent b54eec95c1
commit c4c395af31
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 8 additions and 0 deletions

View File

@ -1068,6 +1068,9 @@ class Feed extends AppModel
if (!empty($feed['Feed']['settings']['disable_correlation'])) {
$event['Event']['disable_correlation'] = (bool) $feed['Feed']['settings']['disable_correlation'];
}
if (!empty($feed['Feed']['settings']['unpublish_event'])) {
$event['Event']['published'] = (bool) $feed['Feed']['settings']['unpublish_event'];
}
}
return $event;
}

View File

@ -26,6 +26,11 @@ echo $this->element('genericElements/Form/genericForm', [
'label' => __('Disable correlation'),
'type' => 'checkbox'
],
[
'field' => 'Feed.settings.unpublish_event',
'label' => __('Unpublish events'),
'type' => 'checkbox'
],
[
'field' => 'name',
'label' => __('Name'),