Automatically highlight package requests after a configurable period of time. Defaults to 14 days.
Signed-off-by: Lukas Fleischer <archli...@cryptocrack.de> --- web/lib/config.inc.php.proto | 3 +++ web/template/pkgreq_results.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/lib/config.inc.php.proto b/web/lib/config.inc.php.proto index 10ed07e..a9137f1 100644 --- a/web/lib/config.inc.php.proto +++ b/web/lib/config.inc.php.proto @@ -62,3 +62,6 @@ $MAX_RPC_RESULTS = 5000; # Mailing list to send package request notifications to. $AUR_REQUEST_ML = "aur-gene...@archlinux.org"; + +# Time to wait until a package request is due. +$REQUEST_IDLE_TIME = 60 * 60 * 24 * 14; diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php index 33195c7..213f180 100644 --- a/web/template/pkgreq_results.php +++ b/web/template/pkgreq_results.php @@ -41,7 +41,7 @@ <td> <a href="<?= get_uri('/account/') . htmlspecialchars($row['User'], ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($row['User'])) ?>"><?= htmlspecialchars($row['User']) ?></a> </td> - <td><?= gmdate("Y-m-d H:i", intval($row['RequestTS'])) ?></td> + <td<?php if (time() - intval($row['RequestTS']) > $REQUEST_IDLE_TIME): ?> class="flagged"<?php endif; ?>><?= gmdate("Y-m-d H:i", intval($row['RequestTS'])) ?></td> <?php if ($row['Status'] == 0): ?> <td> <form action="<?= get_uri('/pkgbase/'); ?>" method="post"> -- 2.0.0