diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/common.inc.php | 3 | ||||
-rw-r--r-- | conf/config.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/conf/common.inc.php b/conf/common.inc.php index 506134d..07a7475 100644 --- a/conf/common.inc.php +++ b/conf/common.inc.php | |||
@@ -2,9 +2,6 @@ | |||
2 | 2 | ||
3 | require_once 'config.php'; | 3 | require_once 'config.php'; |
4 | 4 | ||
5 | $CONFIG['webdir'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_FILENAME']); | ||
6 | $CONFIG['weburl'] = preg_replace('/(?<=\/)[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); | ||
7 | |||
8 | if (!ini_get('date.timezone')) { | 5 | if (!ini_get('date.timezone')) { |
9 | date_default_timezone_set($CONFIG['default_timezone']); | 6 | date_default_timezone_set($CONFIG['default_timezone']); |
10 | } | 7 | } |
diff --git a/conf/config.php b/conf/config.php index eae3307..23a3a90 100644 --- a/conf/config.php +++ b/conf/config.php | |||
@@ -3,6 +3,10 @@ | |||
3 | # collectd version | 3 | # collectd version |
4 | $CONFIG['version'] = 5; | 4 | $CONFIG['version'] = 5; |
5 | 5 | ||
6 | # Do this here, so it can be overriden, usually in case part of the path is a script for wrapping PHP. | ||
7 | $CONFIG['webdir'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_FILENAME']); | ||
8 | $CONFIG['weburl'] = preg_replace('/(?<=\/)[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); | ||
9 | |||
6 | # collectd's datadir | 10 | # collectd's datadir |
7 | $CONFIG['datadir'] = '../apt-panopticon/rrd'; | 11 | $CONFIG['datadir'] = '../apt-panopticon/rrd'; |
8 | 12 | ||