From 79ac52d54a51acdbd469f2d48890eb11e04ac991 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Fri, 28 Dec 2012 20:25:29 +0100 Subject: remove arguments overview_plugins and other_plugins from plugins_list function Those can be gathered within the function. --- host.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'host.php') diff --git a/host.php b/host.php index 42121ea..71d786a 100644 --- a/host.php +++ b/host.php @@ -7,12 +7,7 @@ require_once 'inc/collectd.inc.php'; $host = validate_get(GET('h'), 'host'); $plugin = validate_get(GET('p'), 'plugin'); -if (!$plugin) { - $selected_plugins = $CONFIG['overview']; -} -else { - $selected_plugins = array($plugin); -} +$selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin); html_start(); @@ -25,7 +20,7 @@ if(!$plugins) { return false; } -plugins_list($host, $CONFIG['overview'], $plugins, $selected_plugins); +plugins_list($host, $selected_plugins); echo '
'; foreach ($selected_plugins as $selected_plugin) { -- cgit v1.1