mirror of https://github.com/MISP/MISP
chg: [internal] Do not call Configure method for every attribute
parent
d249d0cce0
commit
f3dd2e09a4
|
@ -2230,6 +2230,8 @@ class Event extends AppModel
|
|||
}
|
||||
$event = $this->__filterBlockedAttributesByTags($event, $options, $user);
|
||||
$event['Attribute'] = $this->__attachSharingGroups(!$options['sgReferenceOnly'], $event['Attribute'], $sharingGroupData);
|
||||
|
||||
$proposalBlockAttributes = Configure::read('MISP.proposals_block_attributes');
|
||||
// move all object attributes to a temporary container
|
||||
$tempObjectAttributeContainer = array();
|
||||
foreach ($event['Attribute'] as $key => $attribute) {
|
||||
|
@ -2284,10 +2286,7 @@ class Event extends AppModel
|
|||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
Configure::read('MISP.proposals_block_attributes') &&
|
||||
!empty($options['allow_proposal_blocking'])
|
||||
) {
|
||||
if ($proposalBlockAttributes && !empty($options['allow_proposal_blocking'])) {
|
||||
foreach ($results[$eventKey]['Attribute'][$key]['ShadowAttribute'] as $sa) {
|
||||
if ($sa['proposal_to_delete'] || $sa['to_ids'] == 0) {
|
||||
unset($results[$eventKey]['Attribute'][$key]);
|
||||
|
|
Loading…
Reference in New Issue