mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <archlinux@cryptocrack.de>
This commit is contained in:
parent
a0a5230708
commit
76343fb915
24 changed files with 200 additions and 216 deletions
|
@ -34,9 +34,10 @@
|
|||
|
||||
<?php while (list($indx, $row) = each($results)): ?>
|
||||
<?php
|
||||
$due = ($row['Open'] && time() - intval($row['RequestTS']) > $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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue