From 86d3c5f1596d3a9510670eb32f53fe65234352c0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 6 Dec 2007 22:18:19 +0000 Subject: [PATCH] "fix to display readonly link-entry without id empty (showed text search)" --- etemplate/inc/class.link_widget.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index 917c2af043..d7d91c4fec 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -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 "

link-to is readonly, cell=".print_r($cell,true).", readonlys=".print_r($readonlys)."

\n"; + //echo "

link-to is readonly, cell=".print_r($cell,true).", readonlys=".print_r($readonlys).", value='$value'

\n"; // readonly ==> omit the whole widget + $value = ''; $cell = $tmpl->empty_cell(); return; }