From a652177a65cc17c8dddaa739d30ce40dc20d68a9 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 8 Oct 2011 11:29:11 +0200 Subject: include trailing slash in config weburl variable When running CGP in the root, the header didn't link to the overview page because the href was empty. Reported-by: Nikoli --- inc/collectd.inc.php | 2 +- inc/html.inc.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php index 11dc91f..439d507 100644 --- a/inc/collectd.inc.php +++ b/inc/collectd.inc.php @@ -133,7 +133,7 @@ function graphs_from_plugin($host, $plugin) { ? $CONFIG['time_range'][$plugin] : $CONFIG['time_range']['default']; - printf(''."\n", + printf(''."\n", $CONFIG['weburl'], build_url('detail.php', $items, $time), $CONFIG['weburl'], diff --git a/inc/html.inc.php b/inc/html.inc.php index d4a31f2..2e71488 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php @@ -18,8 +18,8 @@ function html_start() { CGP{$path} - - + + @@ -51,7 +51,7 @@ function html_end() { echo << @@ -71,7 +71,7 @@ function plugin_header($host, $plugin, $status) { $a = '-'; } - return printf("

\"[%s]\" %s

\n", $f, $host, $plugin, $CONFIG['weburl'], $i, $a, $plugin); + return printf("

\"[%s]\" %s

\n", $f, $host, $plugin, $CONFIG['weburl'], $i, $a, $plugin); } function host_summary($hosts) { @@ -88,7 +88,7 @@ function host_summary($hosts) { $host_counter++; printf('', $row_style[$host_counter % 2]); - printf('%s', + printf('%s', $CONFIG['weburl'],$host, $host); if ($CONFIG['showload']) { -- cgit v1.1