mirror of https://github.com/MISP/MISP
fix: [attackMatrix] only return the result for the last attached galaxy
If a galaxy is already attached, just skip the message. (The return value is a string, we don't want to compare the string value for each galaxy to be attached)pull/3372/head
parent
3409e66b96
commit
05a56a3048
|
@ -158,9 +158,9 @@ class GalaxiesController extends AppController {
|
|||
|
||||
public function attachMultipleClusters($target_id, $target_type = 'event') {
|
||||
$cluster_ids = json_decode($this->request->data['Galaxy']['target_ids'], true);
|
||||
$result = ""; // temp
|
||||
$result = "";
|
||||
foreach($cluster_ids as $cluster_id) {
|
||||
$result .= $this->Galaxy->attachCluster($this->Auth->user(), $target_type, $target_id, $cluster_id);
|
||||
$result = $this->Galaxy->attachCluster($this->Auth->user(), $target_type, $target_id, $cluster_id);
|
||||
}
|
||||
$this->Flash->info($result);
|
||||
$this->redirect($this->referer());
|
||||
|
|
Loading…
Reference in New Issue