]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/ovpnclients.dat
ovpnclients.dat: Display a notice if there are no entries.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / ovpnclients.dat
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";