]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ovpnclients.dat: Display a notice if there are no entries.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 13 Apr 2020 07:45:40 +0000 (09:45 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 1 May 2020 19:13:57 +0000 (19:13 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
html/cgi-bin/logs.cgi/ovpnclients.dat
langs/en/cgi-bin/en.pl

index cf3e0e7bc06c3d25884edd408491408db61224ff..b84c2b8d7baec5b7deb940a07c28c193a059fd43 100755 (executable)
@@ -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 "<tr><td bgcolor='$color{'color22'}' colspan='5' align='center'>$Lang::tr{'no entries'}</td></tr>\n";
+}
 
 print "</table><br>\n";
 
index 0891cc8866e7bf080344ae5e697fb85e59cfc9b6..95e25ae0cd0c6d7435f41c3c1fab10305f294f2c 100644 (file)
 '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.',