mirror of https://github.com/MISP/MISP
chg: [galaxyClusters:selectCluster] Only offers non-deleted clusters
parent
70f1ccf231
commit
4b46b06809
|
@ -350,10 +350,15 @@ class GalaxiesController extends AppController
|
||||||
public function selectCluster($target_id, $target_type = 'event', $selectGalaxy = false)
|
public function selectCluster($target_id, $target_type = 'event', $selectGalaxy = false)
|
||||||
{
|
{
|
||||||
$conditions = array();
|
$conditions = array();
|
||||||
$conditions = array('OR' => array(
|
$conditions = array(
|
||||||
|
'OR' => array(
|
||||||
'GalaxyCluster.published' => true,
|
'GalaxyCluster.published' => true,
|
||||||
'GalaxyCluster.default' => true,
|
'GalaxyCluster.default' => true,
|
||||||
));
|
),
|
||||||
|
'AND' => array(
|
||||||
|
'GalaxyCluster.deleted' => false,
|
||||||
|
)
|
||||||
|
);
|
||||||
if ($selectGalaxy) {
|
if ($selectGalaxy) {
|
||||||
$conditions['GalaxyCluster.galaxy_id'] = $selectGalaxy;
|
$conditions['GalaxyCluster.galaxy_id'] = $selectGalaxy;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue