ovpnclients.dat: Display error when the to date is not later than the from date.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Stefan Schantl
2020-04-13 09:45:41 +02:00
committed by Arne Fitzenreiter
parent c7d55d7fbd
commit 0f195a5305
2 changed files with 6 additions and 0 deletions

View File

@@ -90,6 +90,11 @@ my $database_handle = DBI->connect("DBI:SQLite:dbname=$database", "", "", { Rais
my $from_datestring = sprintf '%04d-%02d-%02d', ($cgiparams{"FROM_YEAR"}, $cgiparams{"FROM_MONTH"}, $cgiparams{"FROM_DAY"});
my $to_datestring = sprintf '%04d-%02d-%02d', ($cgiparams{"TO_YEAR"}, $cgiparams{"TO_MONTH"}, $cgiparams{"TO_DAY"});
# Check if the to datestring is later than the from datestring.
unless ($to_datestring ge $from_datestring) {
$errormessage = "$Lang::tr{'error the to date has to be later than the from date'}";
}
my $database_query = qq(
SELECT
common_name, SUM(

View File

@@ -1015,6 +1015,7 @@
'error config' => 'Could not open /var/ipfire/ovpn/config/ZERINA.ovpn !',
'error external access' => 'Could not open /var/ipfire/xtaccess/config (external acccess could not be granted)!',
'error messages' => 'Error messages',
'error the to date has to be later than the from date' => 'The to date has to be later than the from date!',
'esp encryption' => 'ESP Encryption:',
'esp grouptype' => 'ESP Grouptype:',
'esp integrity' => 'ESP Integrity:',