chg: [sync] unpublish event on pull sync if unpublish_event is set. fix #7197

pull/7199/head
Jeroen Pinoy 2021-03-12 10:59:33 +00:00
parent d989759211
commit a0dc10b65c
1 changed files with 4 additions and 0 deletions

View File

@ -360,6 +360,10 @@ class Server extends AppModel
}
}
}
// Set published to false if unpublish_event is set for the server
if (!empty($server['Server']['unpublish_event'])) {
$event['Event']['published'] = 0;
}
// Distribution, set reporter of the event, being the admin that initiated the pull
$event['Event']['user_id'] = $user['id'];