dhcp.cgi: Count up key when skippingh search entries

This caused a bug that when the user wanted to edit one
of the static leases and clicked on the edit icon that
an other entry opened up for editing.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2015-06-17 14:02:05 +02:00
parent a1468f66f0
commit e353470a8c

View File

@@ -942,7 +942,10 @@ foreach my $line (@current2) {
# Skip all entries that do not match the search query
if ($search_query ne "") {
next if (!grep(/$search_query/, @temp));
if (!grep(/$search_query/, @temp)) {
$key++;
next;
}
}
if ($dhcpsettings{'KEY2'} eq $key) {