From db5bc6fbd9a568bd3267fecff076da455d5e23f7 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 28 Sep 2009 19:53:38 +0200 Subject: change webdir/weburl and include/require usage - Don't depend on includes from files that are included. - Don't use webdir with includes/requires (also because webdir couldn't be available in some cases). - Use common.inc.php instead of config.php in all plugins to have all configuration settings available. --- plugin/sensors.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugin/sensors.php') diff --git a/plugin/sensors.php b/plugin/sensors.php index ad43378..c7f038b 100644 --- a/plugin/sensors.php +++ b/plugin/sensors.php @@ -2,8 +2,8 @@ # Collectd Sensors plugin -require_once $CONFIG['webdir'].'/conf/config.php'; -require_once $CONFIG['webdir'].'/type/Default.class.php'; +require_once 'conf/common.inc.php'; +require_once 'type/Default.class.php'; ## LAYOUT # disk-XXXX/ @@ -12,7 +12,7 @@ require_once $CONFIG['webdir'].'/type/Default.class.php'; # disk-XXXX/voltage-XXXX.rrd # grouped -require_once $CONFIG['webdir'].'/inc/collectd.inc.php'; +require_once 'inc/collectd.inc.php'; $tinstance = collectd_plugindetail($host, $plugin, 'ti', array('t' => $type)); $obj = new Type_Default; -- cgit v1.1