"fix to display readonly link-entry without id empty (showed text search)"

This commit is contained in:
Ralf Becker 2007-12-06 22:18:19 +00:00
parent 0bea253fc7
commit 86d3c5f159

View File

@ -116,10 +116,11 @@
$extension_data['needed'] = $cell['needed'];
$help = $cell['help'] ? ($value['help'] ? $value['help'] : $cell['help']) : lang('view this linked entry in its application');
if (($type == 'link-to' || $type == 'link-add') && ($cell['readonly'] || $readonlys))
if (($type == 'link-to' || $type == 'link-add' || $type == 'link-entry' && !$value) && ($cell['readonly'] || $readonlys))
{
//echo "<p>link-to is readonly, cell=".print_r($cell,true).", readonlys=".print_r($readonlys)."</p>\n";
//echo "<p>link-to is readonly, cell=".print_r($cell,true).", readonlys=".print_r($readonlys).", value='$value'</p>\n";
// readonly ==> omit the whole widget
$value = '';
$cell = $tmpl->empty_cell();
return;
}