diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6c7d69fab70..3e1df6f7912 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2963,19 +2963,22 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $popuptab = 1; $outmore .= '
'; // The css used to hide/show popup } - $outmore .= '
'; + $outmore_content = ''; + if (isset($links[$i][2]) && $links[$i][2] == 'image') { if (!empty($links[$i][0])) { - $outmore .= ''.$links[$i][1].''."\n"; + $outmore_content .= ''.$links[$i][1].''."\n"; } else { - $outmore .= ''.$links[$i][1].''."\n"; + $outmore_content .= ''.$links[$i][1].''."\n"; } } elseif (!empty($links[$i][1])) { - $outmore .= ''; - $outmore .= preg_replace('/([a-z])\|([a-z])/i', '\\1 | \\2', $links[$i][1]); // Replace x|y with x | y to allow wrap on long composed texts. - $outmore .= ''."\n"; + $outmore_content .= ''; + $outmore_content .= preg_replace('/([a-z])\|([a-z])/i', '\\1 | \\2', $links[$i][1]); // Replace x|y with x | y to allow wrap on long composed texts. + $outmore_content .= ''."\n"; + } + if ($outmore_content !== '') { + $outmore .= '
' . $outmore_content . '
'; } - $outmore .= '
'; $nbintab++; }