Skip to content

Commit c349e43

Browse files
Ahmet OeztuerkAhmet Oeztuerk
authored andcommitted
fix grep expression that checks if "contacts" are picked
had to cast the Thruk::Base::list back into an array
1 parent b43b6c1 commit c349e43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Thruk/Controller/status.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ sub _process_combined_page {
12491249
push @{$extra_svc_columns}, 'long_plugin_output';
12501250
push @{$extra_hst_columns}, 'long_plugin_output';
12511251
}
1252-
push @{$extra_svc_columns}, 'contacts' if ( grep { /^contacts$/ixm } Thruk::Base::list($selected_svc_columns));
1252+
push @{$extra_svc_columns}, 'contacts' if ( grep ( /^contacts$/ixm , @{Thruk::Base::list($selected_svc_columns)} ) );
12531253

12541254
my $services = $c->db->get_services( filter => [ Thruk::Utils::Auth::get_auth_filter( $c, 'services' ), $servicefilter ],
12551255
sort => { $order => $sortoptions->{$sortoption}->[0] },
@@ -1289,7 +1289,7 @@ sub _process_combined_page {
12891289
$sortoption = 1 if !defined $sortoptions->{$sortoption};
12901290
$c->stash->{'hst_orderby'} = $sortoptions->{$sortoption}->[1];
12911291
$c->stash->{'hst_orderdir'} = $order;
1292-
push @{$extra_hst_columns}, 'contacts' if (grep { /^contacts$/ixm } Thruk::Base::list($selected_hst_columns));
1292+
push @{$extra_hst_columns}, 'contacts' if ( grep ( /^contacts$/ixm , @{Thruk::Base::list($selected_hst_columns)} ) );
12931293

12941294
my $hosts = $c->db->get_hosts( filter => [ Thruk::Utils::Auth::get_auth_filter( $c, 'hosts' ), $hostfilter ],
12951295
sort => { $order => $sortoptions->{$sortoption}->[0] },

0 commit comments

Comments
 (0)