diff --git a/app/Controller/EventsController.php b/app/Controller/EventsController.php index 0c5377b08..2a4ac84e1 100644 --- a/app/Controller/EventsController.php +++ b/app/Controller/EventsController.php @@ -4669,8 +4669,7 @@ class EventsController extends AppController $this->loadModel('GalaxyCluster'); $clusters = $this->GalaxyCluster->fetchGalaxyClusters($this->Auth->user(), array('conditions' => array('GalaxyCluster.id' => $clusterIds)), $full=true); App::uses('ClusterRelationsGraphTool', 'Tools'); - $grapher = new ClusterRelationsGraphTool(); - $grapher->construct($this->Auth->user(), $this->GalaxyCluster); + $grapher = new ClusterRelationsGraphTool($this->Auth->user(), $this->GalaxyCluster); $relations = $grapher->getNetwork($clusters, $keepNotLinkedClusters=true, $includeReferencingRelation=true); if ($this->_isRest()) { return $this->RestResponse->viewData($relations, $this->response->type()); diff --git a/app/Controller/GalaxiesController.php b/app/Controller/GalaxiesController.php index 7cf55d54b..15e609fc6 100644 --- a/app/Controller/GalaxiesController.php +++ b/app/Controller/GalaxiesController.php @@ -586,8 +586,7 @@ class GalaxiesController extends AppController 'conditions' => array('Galaxy.id' => $galaxyId) )); App::uses('ClusterRelationsGraphTool', 'Tools'); - $grapher = new ClusterRelationsGraphTool(); - $grapher->construct($this->Auth->user(), $this->Galaxy->GalaxyCluster); + $grapher = new ClusterRelationsGraphTool($this->Auth->user(), $this->Galaxy->GalaxyCluster); $relations = $grapher->getNetwork($clusters); if ($this->_isRest()) { return $this->RestResponse->viewData($relations, $this->response->type()); diff --git a/app/Lib/Tools/ClusterRelationsGraphTool.php b/app/Lib/Tools/ClusterRelationsGraphTool.php index 9585c3931..0cf558ced 100644 --- a/app/Lib/Tools/ClusterRelationsGraphTool.php +++ b/app/Lib/Tools/ClusterRelationsGraphTool.php @@ -1,15 +1,14 @@ GalaxyCluster = $GalaxyCluster; $this->user = $user; - return true; } /** @@ -75,7 +74,7 @@ 'conditions' => array( 'referenced_galaxy_cluster_uuid' => $cluster['GalaxyCluster']['uuid'] ), - 'contain' => array('Org', 'Orgc', 'SharingGroup'), + 'contain' => array('SharingGroup'), )); if (!empty($referencingRelations)) { foreach ($referencingRelations as $relation) {