In the column that contains the merge target, only display the
parentheses if the merge target is a non-empty string.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/template/pkgreq_results.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php
index 2898bd5..5e64476 100644
--- a/web/template/pkgreq_results.php
+++ b/web/template/pkgreq_results.php
@@ -40,7 +40,12 @@
                        <td><?= htmlspecialchars($row["Name"]) ?></td>
                        <?php endif; ?>
                        <?php if ($row['Type'] == 'merge'): ?>
-                       <td><?= htmlspecialchars(ucfirst($row['Type']), 
ENT_QUOTES); ?> (<?= htmlspecialchars($row['MergeInto'], ENT_QUOTES); ?>)</td>
+                       <td>
+                               <?= htmlspecialchars(ucfirst($row['Type']), 
ENT_QUOTES); ?>
+                               <?php if (!empty($row['MergeInto'])): ?>
+                               (<?= htmlspecialchars($row['MergeInto'], 
ENT_QUOTES); ?>)
+                               <?php endif; ?>
+                       </td>
                        <?php else: ?>
                        <td><?= htmlspecialchars(ucfirst($row['Type']), 
ENT_QUOTES); ?></td>
                        <?php endif; ?>
-- 
2.0.2

Reply via email to