[aur-dev] [PATCH] updates_table.php: Fix identification of new packages

Marcel Korpel marcel.korpel at gmail.com
Wed Aug 19 07:47:10 UTC 2015


Currently, package creation has to be done separately from first
submission, so ModifiedTS will never be the same as SubmittedTS.
Consider all packages that are submitted within an hour from package
creation as new.

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