mirror of https://github.com/MISP/MISP
Merge branch '2.4' of https://github.com/MISP/MISP into 2.4
commit
5f2f51ed21
|
@ -502,6 +502,7 @@ class Feed extends AppModel
|
|||
foreach ($filterRules[$field][$prefix] as $temp) {
|
||||
if (stripos($object['name'], $temp) !== false) {
|
||||
$found = true;
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -515,9 +516,6 @@ class Feed extends AppModel
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!$filterRules) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,13 @@ class Warninglist extends AppModel
|
|||
if ($redis !== false) {
|
||||
$key = 'misp:warninglist_entries_cache:' . $id;
|
||||
$redis->del($key);
|
||||
$redis->sAddArray($key, $warninglistEntries);
|
||||
if (method_exists($redis, 'saddArray')) {
|
||||
$redis->sAddArray($key, $warninglistEntries);
|
||||
} else {
|
||||
foreach ($warninglistEntries as $entry) {
|
||||
$redis->sAdd('misp:warninglist_entries_cache:' . $id, $entry);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -24,20 +24,22 @@
|
|||
if (!empty($data['html'])) {
|
||||
echo sprintf('<p>%s</p>', $data['html']);
|
||||
}
|
||||
$paginationData = array();
|
||||
if (!empty($data['paginationBaseurl'])) {
|
||||
$paginationData['paginationBaseurl'] = $data['paginationBaseurl'];
|
||||
$skipPagination = isset($data['skip_pagination']) && $data['skip_pagination'];
|
||||
if (!$skipPagination) {
|
||||
$paginationData = array();
|
||||
if (!empty($data['paginationBaseurl'])) {
|
||||
$paginationData['paginationBaseurl'] = $data['paginationBaseurl'];
|
||||
}
|
||||
echo $this->element('/genericElements/IndexTable/pagination', $paginationData);
|
||||
}
|
||||
echo $this->element('/genericElements/IndexTable/pagination', $paginationData);
|
||||
if (!empty($data['top_bar'])) {
|
||||
echo $this->element('/genericElements/ListTopBar/scaffold', array('data' => $data['top_bar']));
|
||||
}
|
||||
$rows = '';
|
||||
$row_element = $data['row_element'] ?: 'row';
|
||||
$options = isset($data['options']) ? $data['options'] : array();
|
||||
$actions = isset($data['actions']) ? $data['actions'] : array();
|
||||
foreach ($data['data'] as $k => $data_row) {
|
||||
$row_element = 'row';
|
||||
if (!empty($data['row_element'])) {
|
||||
$row_element = $data['row_element'];
|
||||
}
|
||||
$rows .= sprintf(
|
||||
'<tr data-row-id="%s">%s</tr>',
|
||||
h($k),
|
||||
|
@ -47,17 +49,20 @@
|
|||
'k' => $k,
|
||||
'row' => $data_row,
|
||||
'fields' => $data['fields'],
|
||||
'options' => empty($data['options']) ? array() : $data['options'],
|
||||
'actions' => empty($data['actions']) ? array() : $data['actions']
|
||||
'options' => $options,
|
||||
'actions' => $actions,
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
echo sprintf(
|
||||
'<table class="table table-striped table-hover table-condensed">%s%s</table>',
|
||||
$this->element('/genericElements/IndexTable/headers', array('fields' => $data['fields'], 'paginator' => $this->Paginator, 'actions' => empty($data['actions']) ? false : true)),
|
||||
$rows
|
||||
);
|
||||
echo $this->element('/genericElements/IndexTable/pagination_counter', $paginationData);
|
||||
echo $this->element('/genericElements/IndexTable/pagination', $paginationData);
|
||||
?>
|
||||
|
||||
if (!$skipPagination) {
|
||||
echo $this->element('/genericElements/IndexTable/pagination_counter', $paginationData);
|
||||
echo $this->element('/genericElements/IndexTable/pagination', $paginationData);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue