[aur-dev] [PATCH] updates_table.php: Consider packages first submitted in the last hour as new
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@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 07:17:17, Marcel Korpel wrote:
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@gmail.com> --- web/template/stats/updates_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [...]
Good catch but the commit message title is a bit inaccurate... If you cannot come up with a short explanation, maybe just say updates_table.php: Fix identification of new packages and explain all the details in the message body.
* Lukas Fleischer <lfleischer@archlinux.org> (Wed, 19 Aug 2015 09:14:24 +0200):
Good catch but the commit message title is a bit inaccurate...
Yeah, I realized that when reading my message now, I'll resubmit with a reworded commit message.
participants (2)
-
Lukas Fleischer
-
Marcel Korpel