From 7ead590e2b2865d11ff949aa748338d86193f567 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 22 Mar 2017 17:31:59 +0100 Subject: [PATCH] Fix bug for delete of hosts --- lib/Thruk/Controller/api_conf.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Thruk/Controller/api_conf.pm b/lib/Thruk/Controller/api_conf.pm index 928274d..492ab1e 100644 --- a/lib/Thruk/Controller/api_conf.pm +++ b/lib/Thruk/Controller/api_conf.pm @@ -1287,13 +1287,13 @@ sub hosts { if ( $mode eq "delete" ) { # This case is first dialog - if ( not defined($confirm) and $host =~ m/\..*\./ ) { + if ($submit eq "Submit" and $host) { $host_page .= display_delete_confirmation( 'host', 'hosts', @hosts ); } # This case is delete request - elsif ( $confirm eq "Confirm" and $host =~ m/\..*\./ ) { + elsif ($confirm eq "Confirm" and $host) { my $cascade = ''; if ( $cascading eq "true" ) { $cascade = '?cascade=1';