From 4b46b0680980f48efb5ba8a91e6d78ebb000a720 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Tue, 14 Jul 2020 16:23:36 +0200 Subject: [PATCH] chg: [galaxyClusters:selectCluster] Only offers non-deleted clusters --- app/Controller/GalaxiesController.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Controller/GalaxiesController.php b/app/Controller/GalaxiesController.php index 522239904..b97e65a68 100644 --- a/app/Controller/GalaxiesController.php +++ b/app/Controller/GalaxiesController.php @@ -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; }