mirror of https://github.com/MISP/MISP
Merge pull request #4299 from nikofil/zmq_flag_fix
Fix checking of incorrect flags when publishing to ZMQpull/4313/head
commit
3e25f98c4d
|
@ -354,7 +354,7 @@ class Event extends AppModel
|
|||
$orgc = $this->Orgc->find('first', array('conditions' => array('Orgc.id' => $this->data['Event']['orgc_id']), 'recursive' => -1, 'fields' => array('Orgc.name')));
|
||||
$this->EventBlacklist->save(array('event_uuid' => $this->data['Event']['uuid'], 'event_info' => $this->data['Event']['info'], 'event_orgc' => $orgc['Orgc']['name']));
|
||||
if (!empty($this->data['Event']['id'])) {
|
||||
if (Configure::read('Plugin.ZeroMQ_enable') && Configure::read('Plugin.ZeroMQ_attribute_notifications_enable')) {
|
||||
if (Configure::read('Plugin.ZeroMQ_enable') && Configure::read('Plugin.ZeroMQ_event_notifications_enable')) {
|
||||
$pubSubTool = $this->getPubSubTool();
|
||||
$pubSubTool->event_save(array('Event' => $this->data['Event']), 'delete');
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ class Log extends AppModel
|
|||
|
||||
public function logData($data)
|
||||
{
|
||||
if (Configure::read('Plugin.ZeroMQ_enable') && Configure::read('Plugin.ZeroMQ_user_notifications_enable')) {
|
||||
if (Configure::read('Plugin.ZeroMQ_enable') && Configure::read('Plugin.ZeroMQ_audit_notifications_enable')) {
|
||||
$pubSubTool = $this->getPubSubTool();
|
||||
$pubSubTool->publish($data, 'audit', 'log');
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ class MispObject extends AppModel
|
|||
|
||||
public function afterSave($created, $options = array())
|
||||
{
|
||||
if (Configure::read('Plugin.ZeroMQ_enable') && Configure::read('Plugin.ZeroMQ_attribute_notifications_enable')) {
|
||||
if (Configure::read('Plugin.ZeroMQ_enable') && Configure::read('Plugin.ZeroMQ_object_notifications_enable')) {
|
||||
if (empty($this->data['Object']['skip_zmq'])) {
|
||||
$pubSubTool = $this->getPubSubTool();
|
||||
$object = $this->find('first', array(
|
||||
|
|
Loading…
Reference in New Issue