Merge branch 'develop' of github.com:MISP/MISP into develop

pull/9665/head
Sami Mokaddem 2024-04-03 15:19:31 +02:00
commit 87c71ecfc9
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 4 additions and 3 deletions

View File

@ -1416,7 +1416,8 @@ class EventsController extends AppController
$exception = false;
$warningTagConflicts = array();
$filters = $this->_harvestParameters($filterData, $exception);
$analystData = $this->Event->attachAnalystData($event['Event']);
$event['Event'] = array_merge($event['Event'], $analystData);
$emptyEvent = (empty($event['Object']) && empty($event['Attribute']));
$this->set('emptyEvent', $emptyEvent);

View File

@ -42,7 +42,7 @@ class AnalystDataParentBehavior extends ModelBehavior
}
public function fetchAnalystDataBulk(Model $model, array $uuids, array $types = ['Note', 'Opinion', 'Relationship']) {
$uuids = array_chunk($uuids, 10000);
$uuids = array_chunk($uuids, 100000);
if (empty($this->__currentUser)) {
$user_id = Configure::read('CurrentUserId');
$this->User = ClassRegistry::init('User');
@ -65,7 +65,7 @@ class AnalystDataParentBehavior extends ModelBehavior
public function attachAnalystDataBulk(Model $model, array $objects, array $types = ['Note', 'Opinion', 'Relationship'])
{
$uuids = [];
$objects = array_chunk($objects, 10000, true);
$objects = array_chunk($objects, 100000, true);
if (empty($this->__currentUser)) {
$user_id = Configure::read('CurrentUserId');
$this->User = ClassRegistry::init('User');