[aur-dev] [PATCH] updates_table.php: Consider packages first submitted in the last hour as new

Marcel Korpel marcel.korpel at gmail.com
Wed Aug 19 05:17:17 UTC 2015


Since there will always be a delay between package creation and its
first submission, ModifiedTS will never be the same as SubmittedTS.

Signed-off-by: Marcel Korpel <marcel.korpel at gmail.com>
---
 web/template/stats/updates_table.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php
index a4b31c5..775d707 100644
--- a/web/template/stats/updates_table.php
+++ b/web/template/stats/updates_table.php
@@ -10,7 +10,7 @@
 				<a href="<?= get_pkg_uri($row["Name"]); ?>" title="<?= htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?>"><?= htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
 			</td>
 			<td class="pkg-new">
-				<?php if ($row["ModifiedTS"] === $row["SubmittedTS"]): ?>
+				<?php if ($row["ModifiedTS"] - $row["SubmittedTS"] < 3600): ?>
 				<img src="images/new.png" alt="New!" />
 				<?php endif; ?>
 			</td>
-- 
2.5.0


More information about the aur-dev mailing list