Commit 90a59d39 authored by pifagor's avatar pifagor
Browse files

Issue #2553705 and #2961210 by billywardrop, pifagor, vinmassaro, alex_optim,...

Issue #2553705 and #2961210 by billywardrop, pifagor, vinmassaro, alex_optim, alex.mazaltov: Preparation of module version 1.5.
parent 77147ee1
......@@ -347,19 +347,8 @@ function link_field_update($entity_type, $entity, $field, $instance, $langcode,
*/
function link_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {
foreach ($items as $entity_id => $entity_items) {
$settings = $instances[$entity_id]['settings'];
$trimTitle = trim($settings['title_value']);
if (empty($entity_items) && !empty($trimTitle) && $settings['title'] == 'value') {
$token_value = token_replace($settings['title_value'], array($entity_type => $entities[$entity_id]));
$display_title = htmlspecialchars_decode($token_value, ENT_QUOTES);
$items[$entity_id][0]['url'] = NULL;
$items[$entity_id][0]['title'] = $display_title;
$items[$entity_id][0]['attributes'] = array();
}
else {
foreach ($entity_items as $delta => $value) {
_link_sanitize($items[$entity_id][$delta], $delta, $field, $instances[$entity_id], $entities[$entity_id]);
}
foreach ($entity_items as $delta => $value) {
_link_sanitize($items[$entity_id][$delta], $delta, $field, $instances[$entity_id], $entities[$entity_id]);
}
}
}
......
Supports Markdown
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