Hide old requests from the dashboard

Only show package requests created less than 6 months ago on the
dashboard.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2017-02-15 07:20:50 +01:00
parent b3fdd3f803
commit 92049e8061
2 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,7 @@ max_rpc_results = 5000
max_depends = 1000 max_depends = 1000
aur_request_ml = aur-requests@archlinux.org aur_request_ml = aur-requests@archlinux.org
request_idle_time = 1209600 request_idle_time = 1209600
request_archive_time = 15552000
auto_orphan_age = 15552000 auto_orphan_age = 15552000
auto_delete_age = 86400 auto_delete_age = 86400
source_file_uri = https://aur.archlinux.org/cgit/aur.git/tree/%s?h=%s source_file_uri = https://aur.archlinux.org/cgit/aur.git/tree/%s?h=%s

View file

@ -35,7 +35,9 @@ if (isset($_COOKIE["AURSID"])) {
?> ?>
<h3><?= __("My Requests"); ?></h3> <h3><?= __("My Requests"); ?></h3>
<?php <?php
$results = pkgreq_list(0, 50, uid_from_sid($_COOKIE["AURSID"])); $archive_time = config_get_int('options', 'request_archive_time');
$from = time() - $archive_time;
$results = pkgreq_list(0, 50, uid_from_sid($_COOKIE["AURSID"]), $from);
$show_headers = false; $show_headers = false;
include('pkgreq_results.php'); include('pkgreq_results.php');
?> ?>