mirror of https://github.com/MISP/MISP
Invalid message fixed when accepting several proposals at once
parent
78e58ec2bc
commit
5f153b36c6
|
@ -1 +1 @@
|
|||
{"major":2, "minor":3, "hotfix":176}
|
||||
{"major":2, "minor":3, "hotfix":177}
|
||||
|
|
|
@ -1167,9 +1167,9 @@ class ShadowAttributesController extends AppController {
|
|||
$fails = array_diff($ids, $successes);
|
||||
$this->autoRender = false;
|
||||
if (count($fails) == 0 && count($successes) > 0) {
|
||||
return new CakeResponse(array('body'=> json_encode(array('saved' => true, 'success' => count($successes) . ' proposal' . (count($successes) != 1 ? 's' : '') . ' deleted.')),'status'=>200));
|
||||
return new CakeResponse(array('body'=> json_encode(array('saved' => true, 'success' => count($successes) . ' proposal' . (count($successes) != 1 ? 's' : '') . ' accepted.')),'status'=>200));
|
||||
} else {
|
||||
return new CakeResponse(array('body'=> json_encode(array('saved' => false, 'errors' => count($successes) . ' proposal' . (count($successes) != 1 ? 's' : '') . ' deleted, but ' . count($fails) . ' proposal' . (count($fails) != 1 ? 's' : '') . ' could not be deleted.')),'status'=>200));
|
||||
return new CakeResponse(array('body'=> json_encode(array('saved' => false, 'errors' => count($successes) . ' proposal' . (count($successes) != 1 ? 's' : '') . ' accepted, but ' . count($fails) . ' proposal' . (count($fails) != 1 ? 's' : '') . ' could not be deleted.')),'status'=>200));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue