fix: few typos

pull/4672/head
mokaddem 2019-06-12 11:38:19 +02:00
parent 8a5409949e
commit 5748bab998
2 changed files with 2 additions and 4 deletions

View File

@ -737,7 +737,6 @@ class MispObject extends AppModel
), ),
) )
); );
// $attribute_types = array_keys(Hash::combine($attributes, '{n}.Attribute.type'));
if (empty($attributes)) { if (empty($attributes)) {
return array('templates' => array(), 'types' => array()); return array('templates' => array(), 'types' => array());
} }
@ -822,7 +821,6 @@ class MispObject extends AppModel
public function groupAttributesIntoObject($user, $event_id, $object, $template, $selected_attribute_ids, $selected_object_relation_mapping, $hard_delete_attribute) public function groupAttributesIntoObject($user, $event_id, $object, $template, $selected_attribute_ids, $selected_object_relation_mapping, $hard_delete_attribute)
{ {
$saved_object_id = $this->saveObject($object, $event_id, $template, $user); $saved_object_id = $this->saveObject($object, $event_id, $template, $user);
if (!is_numeric($saved_object_id)) { if (!is_numeric($saved_object_id)) {
return $saved_object_id; return $saved_object_id;
} }
@ -843,7 +841,7 @@ class MispObject extends AppModel
} }
$event = array('Event' => $existing_attributes[0]['Event']); $event = array('Event' => $existing_attributes[0]['Event']);
// Duplicate the attribute and its context, otherwise connected instance will drop the duplicated UUID // Duplicate the attribute and its context, otherwise connected instances will drop the duplicated UUID
foreach ($existing_attributes as $i => $existing_attribute) { foreach ($existing_attributes as $i => $existing_attribute) {
if (isset($selected_object_relation_mapping[$existing_attribute['Attribute']['id']])) { if (isset($selected_object_relation_mapping[$existing_attribute['Attribute']['id']])) {
$sightings = $this->Event->Sighting->attachToEvent($event, $user, $existing_attribute['Attribute']['id']); $sightings = $this->Event->Sighting->attachToEvent($event, $user, $existing_attribute['Attribute']['id']);

View File

@ -243,7 +243,7 @@ class ObjectTemplate extends AppModel
} }
} }
// at this point, an object can be created; checking if all attribute are valids // at this point, an object could created; checking if all attribute are valids
$valid_types = array(); $valid_types = array();
$to_return['invalidTypes'] = array(); $to_return['invalidTypes'] = array();
$to_return['invalidTypesMultiple'] = array(); $to_return['invalidTypesMultiple'] = array();