Commit 5be6d23a authored by Ra Mänd's avatar Ra Mänd
Browse files

Remove redundant 'else' conditions.

parent ebe72902
......@@ -149,12 +149,12 @@ class FieldCollectionItemEntity extends Entity {
if ($field['cardinality'] == 1) {
return $label;
}
elseif ($this->item_id) {
if ($this->item_id) {
return t('!instance_label @count', array('!instance_label' => $label, '@count' => $this->delta() + 1));
}
else {
return t('New !instance_label', array('!instance_label' => $label));
}
return t('New !instance_label', array('!instance_label' => $label));
}
return t('Unconnected field collection item');
}
......
......@@ -1569,7 +1569,8 @@ function field_collection_field_get_entity(&$item, $field_name = NULL) {
}
return $entity;
}
elseif (!isset($item['entity']) && isset($field_name)) {
if (!isset($item['entity']) && isset($field_name)) {
$item['entity'] = entity_create('field_collection_item', array('field_name' => $field_name));
return $item['entity'];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment