mirror of https://github.com/MISP/MISP
fix: [internal] fixed newly introduced error with full_group_by directive when adding galaxies to tag collections
parent
8a96ab1270
commit
6756badac8
|
@ -114,9 +114,9 @@ class GalaxiesController extends AppController
|
||||||
$conditions = $namespace === '0' ? array() : array('namespace' => $namespace);
|
$conditions = $namespace === '0' ? array() : array('namespace' => $namespace);
|
||||||
$galaxies = $this->Galaxy->find('all', array(
|
$galaxies = $this->Galaxy->find('all', array(
|
||||||
'recursive' => -1,
|
'recursive' => -1,
|
||||||
'fields' => array('MAX(Galaxy.version) as latest_version', '*'),
|
'fields' => array('MAX(Galaxy.version) as latest_version', 'id', 'kill_chain_order', 'name', 'icon', 'description'),
|
||||||
'conditions' => $conditions,
|
'conditions' => $conditions,
|
||||||
'group' => array('name'),
|
'group' => array('name', 'id', 'kill_chain_order', 'icon', 'description'),
|
||||||
'order' => array('name asc')
|
'order' => array('name asc')
|
||||||
));
|
));
|
||||||
$items = array(
|
$items = array(
|
||||||
|
|
|
@ -383,7 +383,7 @@ class Galaxy extends AppModel
|
||||||
'Galaxy.type' => $type,
|
'Galaxy.type' => $type,
|
||||||
'Galaxy.namespace' => $namespace
|
'Galaxy.namespace' => $namespace
|
||||||
),
|
),
|
||||||
'group' => array('name')
|
'group' => array('name', 'id')
|
||||||
));
|
));
|
||||||
return empty($galaxy) ? 0 : $galaxy['Galaxy']['id'];
|
return empty($galaxy) ? 0 : $galaxy['Galaxy']['id'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue