[aur-dev] [PATCH] updates_table.php: Fix identification of new packages
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@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
On Wed, 19 Aug 2015 at 09:47:10, Marcel Korpel wrote:
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.
Sounds good to me now.
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com> --- web/template/stats/updates_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [...]
Applied, thanks!
participants (2)
-
Lukas Fleischer
-
Marcel Korpel