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

@ -35,7 +35,9 @@ if (isset($_COOKIE["AURSID"])) {
?>
<h3><?= __("My Requests"); ?></h3>
<?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;
include('pkgreq_results.php');
?>