From: Michael Tremer Date: Wed, 17 Jun 2015 12:02:05 +0000 (+0200) Subject: dhcp.cgi: Count up key when skippingh search entries X-Git-Tag: v2.17-core92~10^2~42^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e353470a8c8d64543960bdf4d20eb86725c939d5;p=ipfire-2.x.git 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 --- diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index c49988e1d9..971c51e6cf 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -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) {