From: Stefan Schantl Date: Mon, 13 Apr 2020 07:45:40 +0000 (+0200) Subject: ovpnclients.dat: Display a notice if there are no entries. X-Git-Tag: v2.25-core145~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7d55d7fbda744ba8c187585f1aa271829648695;p=ipfire-2.x.git ovpnclients.dat: Display a notice if there are no entries. Signed-off-by: Stefan Schantl Signed-off-by: Arne Fitzenreiter --- diff --git a/html/cgi-bin/logs.cgi/ovpnclients.dat b/html/cgi-bin/logs.cgi/ovpnclients.dat index cf3e0e7bc0..b84c2b8d7b 100755 --- a/html/cgi-bin/logs.cgi/ovpnclients.dat +++ b/html/cgi-bin/logs.cgi/ovpnclients.dat @@ -293,8 +293,13 @@ while(my @row = $statement_handle->fetchrow_array()) { # Increase lines count. $lines++; +} - } +# If nothing has been fetched, the amount of lines is still zero. +# In this case display a hint about no data. +unless ($lines) { + print "$Lang::tr{'no entries'}\n"; +} print "
\n"; diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 0891cc8866..95e25ae0cd 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1804,6 +1804,7 @@ 'no alcatelusb firmware' => 'No Alcatel USB firmware. Please upload.', 'no cfg upload' => 'No data was uploaded', 'no dhcp lease' => 'No DHCP lease has been acquired', +'no entries' => 'No entries at the moment.', 'no eciadsl synch.bin file' => 'No ECI ADSL synch.bin file. Please upload.', 'no filter pass' => 'Enter the standard class for non-filtered packets.', 'no fritzdsl driver' => 'No Fritz!DSL driver. Please upload.',