pkgreq_results.php: Only show non-empty merge targets

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 <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-23 15:25:37 +02:00
parent ed1e747847
commit 446d4537d4

View file

@ -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; ?>