fix: Fixed IPv6 host renaming (#7275)

* Fixed IPv6 host renaming

* Added get_rrd_dir() and modified other files to use it where appropriate.

* rrd_name() now uses the new function get_rrd_dir(), to make it simpler to modify the escaping in the future.

* Wrong function name in rrdstep.php
This commit is contained in:
Zmegolaz
2017-09-02 20:45:31 +02:00
committed by Tony Murray
parent b85269f00e
commit 5441bafc81
13 changed files with 29 additions and 16 deletions
+1 -2
View File
@@ -51,14 +51,13 @@ if (empty($hostname)) {
$step = $config['rrd']['step'];
$heartbeat = $config['rrd']['heartbeat'];
$rrd_path = $config['rrd_dir'];
$rrdtool = $config['rrdtool'];
$tmp_path = $config['temp_dir'];
if ($hostname === 'all') {
$hostname = '*';
}
$files = glob($rrd_path . '/' . $hostname . '/*.rrd');
$files = glob(get_rrd_dir($hostname) . '/*.rrd');
$run = readline("Are you sure you want to run this command [N/y]: ");
if (!($run == 'y' || $run == 'Y')) {