]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Captive-Portal: fix wrong expiretime of unused vouchers
authorAlexander Marx <alexander.marx@ipfire.org>
Thu, 4 Feb 2016 11:04:47 +0000 (12:04 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Sep 2017 17:54:45 +0000 (18:54 +0100)
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
html/cgi-bin/captive.cgi

index 841f946b3c2e5618812058d851fc873de77ab42a..a42e398154882d7ce15d2e6a242462480ed4a3ac 100755 (executable)
@@ -460,7 +460,7 @@ END
                if ($voucherhash{$key}[2] eq '0'){
                        $endtime=$Lang::tr{'Captive nolimit'};
                }else{
-                       $endtime=sub{sprintf '%02d.%02d.%04d %02d:%02d', $_[3], $_[4]+1, $_[5]+1900, $_[2], $_[1]  }->(localtime($voucherhash{$key}[0]+$voucherhash{$key}[2]));
+                       $endtime=sub{sprintf '%02d.%02d.%04d %02d:%02d', $_[3], $_[4]+1, $_[5]+1900, $_[2], $_[1]  }->(localtime(time()+$voucherhash{$key}[2]));
                }
 
                if ($count % 2){