mirror of https://github.com/MISP/MISP
chg: [internal] Faster Attribute search
parent
b21f673872
commit
812a424e69
|
@ -1518,7 +1518,7 @@ class AttributesController extends AppController
|
|||
$paramArray = array('value' , 'type', 'category', 'org', 'tags', 'from', 'to', 'last', 'eventid', 'withAttachments', 'uuid', 'publish_timestamp', 'timestamp', 'enforceWarninglist', 'to_ids', 'deleted', 'includeEventUuid', 'event_timestamp', 'threat_level_id', 'includeEventTags', 'first_seen', 'last_seen');
|
||||
$filterData = array(
|
||||
'request' => $this->request,
|
||||
'named_params' => $this->params['named'],
|
||||
'named_params' => $this->request->params['named'],
|
||||
'paramArray' => $paramArray,
|
||||
'additional_delimiters' => PHP_EOL
|
||||
);
|
||||
|
|
|
@ -3902,7 +3902,7 @@ class Attribute extends AppModel
|
|||
return $adata;
|
||||
}
|
||||
|
||||
public function buildFilterConditions($user, &$params)
|
||||
public function buildFilterConditions(array $user, array &$params)
|
||||
{
|
||||
$conditions = $this->buildConditions($user);
|
||||
if (isset($params['wildcard'])) {
|
||||
|
@ -3915,11 +3915,9 @@ class Attribute extends AppModel
|
|||
);
|
||||
$conditions['AND'][] = array('OR' => $this->Event->set_filter_wildcard_attributes($params, $temp, $options));
|
||||
} else {
|
||||
$attribute_conditions = array();
|
||||
$object_conditions = array();
|
||||
if (isset($params['ignore'])) {
|
||||
$params['to_ids'] = array(0, 1);
|
||||
$params['published'] = array(0, 1);
|
||||
unset($params['to_ids']);
|
||||
unset($params['published']);
|
||||
}
|
||||
$simple_params = array(
|
||||
'Attribute' => array(
|
||||
|
|
Loading…
Reference in New Issue