From 76343fb91511b9f53e58b6c01b258bfe00ddb4c6 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 24 Oct 2014 08:31:47 +0200 Subject: Use an INI-style configuration file Replace web/lib/config.inc.php with an INI-style configuration file. This allows us to get rid of several globals and makes it easier to use the same configuration file in external scripts. Signed-off-by: Lukas Fleischer --- web/template/pkgreq_results.php | 5 +++-- 1 file changed, 3 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 3d50c820..24ee877a 100644 --- a/web/template/pkgreq_results.php +++ b/web/template/pkgreq_results.php @@ -34,9 +34,10 @@ $REQUEST_IDLE_TIME); + $idle_time = config_get_int('options', 'request_idle_time'); + $due = ($row['Open'] && time() - intval($row['RequestTS']) > $idle_time); if (!$due) { - $time_left = $REQUEST_IDLE_TIME - (time() - intval($row['RequestTS'])); + $time_left = $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) { -- cgit v1.2.3-24-g4f1b