From 180b45f22509de436d599ff9ca052cafb532600e Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 24 Jun 2019 21:17:54 +0200 Subject: [PATCH] Fix #15230 - Column misalignment Fixes: #15230 Introduced by: 637fe6de06c1c7aa3b9d262462a2e9cac7768fd3 --- libraries/classes/Display/Results.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 5af38ad10d..96f5907ebb 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -1400,6 +1400,9 @@ class Results ? ' colspan="4"' : ''; + $leftOrBoth = $GLOBALS['cfg']['RowActionLinks'] === self::POSITION_LEFT + || $GLOBALS['cfg']['RowActionLinks'] === self::POSITION_BOTH; + // ... before the result table if (($displayParts['edit_lnk'] == self::NO_EDIT_OR_DELETE) && ($displayParts['del_lnk'] == self::NO_EDIT_OR_DELETE) @@ -1408,9 +1411,7 @@ class Results $display_params['emptypre'] = ($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE) && ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE) ? 4 : 0; - } elseif (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) - || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH) - && ($displayParts['text_btn'] == '1') + } elseif ($leftOrBoth && ($displayParts['text_btn'] == '1') ) { // ... at the left column of the result table header if possible // and required @@ -1421,8 +1422,7 @@ class Results $button_html .= '' . $full_or_partial_text_link . ''; - } elseif (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) - || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH) + } elseif ($leftOrBoth && (($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE) || ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE)) ) {