ovpnclients.dat: Display a notice if there are no entries.

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:40 +02:00
committed by Arne Fitzenreiter
parent 1242cb0134
commit c7d55d7fbd
2 changed files with 7 additions and 1 deletions

View File

@@ -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";