From 7283d0fcc29d802774468cfeac83de06b06f4315 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 29 Jul 2014 18:14:46 +0200 Subject: Lock fresh orphan requests Trusted Users should almost always wait for two weeks before accepting an orphan request. Lock orphan requests during the first two weeks. Package bases can still be orphaned and package requests can still be closed manually during that period of time. Signed-off-by: Lukas Fleischer --- web/template/pkgreq_results.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'web/template/pkgreq_results.php') diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php index 5e64476..3d50c82 100644 --- a/web/template/pkgreq_results.php +++ b/web/template/pkgreq_results.php @@ -33,6 +33,19 @@ + $REQUEST_IDLE_TIME); + if (!$due) { + $time_left = $REQUEST_IDLE_TIME - (time() - intval($row['RequestTS'])); + if ($time_left > 48 * 3600) { + $time_left_fmt = __("~%d days left", round($time_left / (24 * 3600))); + } elseif ($time_left > 3600) { + $time_left_fmt = _n("~%d hour left", "~%d hours left", round($time_left / 3600)); + } else { + $time_left_fmt = __("<1 hour left"); + } + } + ?> "> @@ -53,7 +66,7 @@ - $REQUEST_IDLE_TIME): ?> class="flagged"> + class="flagged"> @@ -63,12 +76,15 @@
- +
+ + () +
-- cgit v1.2.3-54-g00ecf