Commit e0e282bb authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor bug fix, lets not time travel to the past.

parent e7c5f610
......@@ -1443,8 +1443,8 @@ sub DoExtend()
# is a week and there are five days left and they asked
# for seven, we give them two.
#
if ($expires_time + ($granted * 3600 * 24) >
time() + (3600 * 24 * $autoextend_maximum)) {
if ($granted && ($expires_time + ($granted * 3600 * 24)) >
(time() + (3600 * 24 * $autoextend_maximum))) {
$granted =
POSIX::ceil(((3600 * 24 * $autoextend_maximum) - $diff) /
(3600 * 24.0));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment