[aur-dev] [PATCH] pkgreq_results.php: Only show non-empty merge targets

Lukas Fleischer archlinux at cryptocrack.de
Wed Jul 23 09:27:02 EDT 2014


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 at cryptocrack.de>
---
 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


More information about the aur-dev mailing list