Commit e60c15f4 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixed problem with interpreting '0' as '' - link text was misinterpreted.

parent bf08aa7d
......@@ -132,4 +132,4 @@ WKHTMLTOPDF = /opt/wkhtmltox/bin/wkhtmltopdf
; thumbnailDirSecure = fileadmin/protected/qfqThumbnail
; thumbnailDirPublic = typo3temp/qfqThumbnail
; cmdInkscape = inkscape
; cmdConvert = convert
\ No newline at end of file
; cmdConvert = convert
......@@ -947,31 +947,12 @@ class Link {
$order = ($vars[NAME_RIGHT] === "l") ? [FINAL_SYMBOL, FINAL_THUMBNAIL, NAME_TEXT] : [NAME_TEXT, FINAL_THUMBNAIL, FINAL_SYMBOL];
foreach ($order as $key) {
if (!empty($vars[$key])) {
if (isset($vars[$key]) && $vars[$key] != '') { // empty() is wrong here, cause '0' would be recognized as empty.
$arr[] = $vars[$key];
}
}
$content = implode(' ', $arr);
// Compose Image & Text
// if ($htmlImage === '') {
// $content = $vars[NAME_TEXT];
// } elseif ($vars[NAME_TEXT] === '') {
// $content = $htmlImage;
// } else {
// if ($vars[NAME_RIGHT] === "l") {
// $content = implode(' ', [$htmlImage, $vars[NAME_TEXT]]);
// } else {
// $content = implode(' ', [$vars[NAME_TEXT], $htmlImage]);
// }
// }
// if ($vars[NAME_RIGHT] === "l") {
// $content = implode(' ', [$htmlImage, $vars[NAME_TEXT]]);
// } else {
// $content = implode(' ', [$vars[NAME_TEXT], $htmlImage]);
// }
if ($vars[NAME_EXTRA_CONTENT_WRAP] != '') {
$content = Support::wrapTag($vars[NAME_EXTRA_CONTENT_WRAP], $content);
}
......
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