diff options
Diffstat (limited to 'plugin/users.php')
| -rw-r--r-- | plugin/users.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugin/users.php b/plugin/users.php index a4558b5..a948fc1 100644 --- a/plugin/users.php +++ b/plugin/users.php | |||
| @@ -12,10 +12,10 @@ require_once 'inc/collectd.inc.php'; | |||
| 12 | $obj = new Type_Default($CONFIG); | 12 | $obj = new Type_Default($CONFIG); |
| 13 | $obj->data_sources = array('value'); | 13 | $obj->data_sources = array('value'); |
| 14 | $obj->ds_names = array( | 14 | $obj->ds_names = array( |
| 15 | 'users' => 'Users', | 15 | 'value' => 'Users', |
| 16 | ); | 16 | ); |
| 17 | $obj->colors = array( | 17 | $obj->colors = array( |
| 18 | 'users' => '0000f0', | 18 | 'value' => '0000f0', |
| 19 | ); | 19 | ); |
| 20 | $obj->width = $width; | 20 | $obj->width = $width; |
| 21 | $obj->heigth = $heigth; | 21 | $obj->heigth = $heigth; |
| @@ -24,8 +24,15 @@ $obj->rrd_vertical = 'Users'; | |||
| 24 | $obj->rrd_format = '%.1lf'; | 24 | $obj->rrd_format = '%.1lf'; |
| 25 | 25 | ||
| 26 | # backwards compatibility | 26 | # backwards compatibility |
| 27 | if ($CONFIG['version'] < 5) | 27 | if ($CONFIG['version'] < 5) { |
| 28 | $obj->data_sources = array('users'); | 28 | $obj->data_sources = array('users'); |
| 29 | 29 | ||
| 30 | $obj->ds_names['users'] = $obj->ds_names['value']; | ||
| 31 | unset($obj->ds_names['value']); | ||
| 32 | |||
| 33 | $obj->colors['users'] = $obj->colors['value']; | ||
| 34 | unset($obj->colors['value']); | ||
| 35 | } | ||
| 36 | |||
| 30 | collectd_flush($obj->identifiers); | 37 | collectd_flush($obj->identifiers); |
| 31 | $obj->rrd_graph(); | 38 | $obj->rrd_graph(); |
