mirror of https://github.com/MISP/MISP
fix: [internal] Fetching filter rules
parent
faf7d9784c
commit
da1818c3cc
|
@ -3072,7 +3072,7 @@ class AppModel extends Model
|
|||
protected function _findColumn($state, $query, $results = array())
|
||||
{
|
||||
if ($state === 'before') {
|
||||
if (isset($query['fields']) && count($query['fields']) === 1) {
|
||||
if (isset($query['fields']) && is_array($query['fields']) && count($query['fields']) === 1) {
|
||||
if (strpos($query['fields'][0], '.') === false) {
|
||||
$query['fields'][0] = $this->alias . '.' . $query['fields'][0];
|
||||
}
|
||||
|
|
|
@ -4586,11 +4586,11 @@ class Server extends AppModel
|
|||
$organisations = [];
|
||||
if ($user['Role']['perm_sharing_group'] || !Configure::read('Security.hide_organisation_index_from_users')) {
|
||||
$organisations = $this->Organisation->find('column', [
|
||||
'fields' => 'name'
|
||||
'fields' => ['name'],
|
||||
]);
|
||||
}
|
||||
$tags = $this->Tag->find('column', [
|
||||
'fields' => 'name'
|
||||
'fields' => ['name'],
|
||||
]);
|
||||
return [
|
||||
'organisations' => $organisations,
|
||||
|
|
Loading…
Reference in New Issue