chg: [galaxyClusters:selectCluster] Only offers non-deleted clusters

pull/6120/head
mokaddem 2020-07-14 16:23:36 +02:00
parent 70f1ccf231
commit 4b46b06809
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 9 additions and 4 deletions

View File

@ -350,10 +350,15 @@ class GalaxiesController extends AppController
public function selectCluster($target_id, $target_type = 'event', $selectGalaxy = false)
{
$conditions = array();
$conditions = array('OR' => array(
'GalaxyCluster.published' => true,
'GalaxyCluster.default' => true,
));
$conditions = array(
'OR' => array(
'GalaxyCluster.published' => true,
'GalaxyCluster.default' => true,
),
'AND' => array(
'GalaxyCluster.deleted' => false,
)
);
if ($selectGalaxy) {
$conditions['GalaxyCluster.galaxy_id'] = $selectGalaxy;
}