fix: [feeds:edit] Recover event_id if it exists

Fix #7293 (second part)
pull/7374/head
mokaddem 2021-04-26 10:12:27 +02:00
parent 8efce54d74
commit 0d35032610
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 0 deletions

View File

@ -360,6 +360,8 @@ class FeedsController extends AppController
if ($this->request->data['Feed']['fixed_event'] == 1) {
if (isset($this->request->data['Feed']['target_event']) && is_numeric($this->request->data['Feed']['target_event'])) {
$this->request->data['Feed']['event_id'] = $this->request->data['Feed']['target_event'];
} else if (!empty($feed['Feed']['event_id'])) {
$this->request->data['Feed']['event_id'] = $feed['Feed']['event_id'];
} else {
$this->request->data['Feed']['event_id'] = 0;
}