Commit c9c29fa3 authored by pianomansam's avatar pianomansam Committed by pifagor
Browse files

Issue #2675568 by pianomansam, Chris Matthews, pifagor: Whether URL and Title...

Issue #2675568 by pianomansam, Chris Matthews, pifagor: Whether URL and Title entity properties are required is incorrectly determined
parent fffb5d9f
......@@ -1761,8 +1761,8 @@ function link_field_property_info_callback(&$info, $entity_type, $field, $instan
$property['auto creation'] = 'link_field_item_create';
$property['property info'] = link_field_item_property_info();
$property['property info']['url']['required'] = !$instance['settings']['url'];
$property['property info']['title']['required'] = ($instance['settings']['title'] == 'required');
$property['property info']['url']['required'] = $instance['required'] && !$instance['settings']['url'];
$property['property info']['title']['required'] = $instance['required'] && ($instance['settings']['title'] == 'required');
if ($instance['settings']['title'] == 'none') {
unset($property['property info']['title']);
}
......
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