From e353470a8c8d64543960bdf4d20eb86725c939d5 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 17 Jun 2015 14:02:05 +0200 Subject: [PATCH] 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 --- html/cgi-bin/dhcp.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.5