mirror of https://github.com/MISP/MISP
parent
4b71eced00
commit
d4224f10c1
|
@ -1389,7 +1389,7 @@ class Event extends AppModel
|
|||
return $tempConditions;
|
||||
}
|
||||
|
||||
public function filterEventIds($user, &$params = array())
|
||||
public function filterEventIds($user, &$params = array(), &$result_count = 0)
|
||||
{
|
||||
$conditions = $this->createEventConditions($user);
|
||||
if (isset($params['wildcard'])) {
|
||||
|
@ -1471,6 +1471,10 @@ class Event extends AppModel
|
|||
'recursive' => -1,
|
||||
'fields' => $fields
|
||||
);
|
||||
|
||||
// Get the count (but not the actual data) of results for paginators
|
||||
$result_count = $this->find('count', $find_params);
|
||||
|
||||
if (isset($params['limit'])) {
|
||||
$find_params['limit'] = $params['limit'];
|
||||
if (isset($params['page'])) {
|
||||
|
@ -5612,7 +5616,7 @@ class Event extends AppModel
|
|||
}
|
||||
}
|
||||
$filters['include_attribute_count'] = 1;
|
||||
$eventid = $this->filterEventIds($user, $filters);
|
||||
$eventid = $this->filterEventIds($user, $filters, $elementCounter);
|
||||
$eventCount = count($eventid);
|
||||
$eventids_chunked = $this->__clusterEventIds($exportTool, $eventid);
|
||||
unset($eventid);
|
||||
|
|
Loading…
Reference in New Issue