Changeset View
Changeset View
Standalone View
Standalone View
net-mgmt/cacti/files/patch-lib__clog_webapi.php
--- lib/clog_webapi.php.orig 2017-04-26 00:30:09 UTC | --- lib/clog_webapi.php.orig 2017-06-05 03:49:49 UTC | ||||
+++ lib/clog_webapi.php | +++ lib/clog_webapi.php | ||||
@@ -40,7 +40,7 @@ function clog_purge_logfile() { | @@ -40,7 +40,7 @@ function clog_purge_logfile() { | ||||
$logfile = read_config_option('path_cactilog'); | $logfile = read_config_option('path_cactilog'); | ||||
if ($logfile == '') { | if ($logfile == '') { | ||||
- $logfile = $config['base_path'] . '/log/cacti.log'; | - $logfile = $config['base_path'] . '/log/cacti.log'; | ||||
+ $logfile = '/var/log/cacti/log'; | + $logfile = '/var/log/cacti/log'; | ||||
} | } | ||||
if (file_exists($logfile)) { | if (file_exists($logfile)) { | ||||
@@ -64,7 +64,7 @@ function clog_view_logfile() { | @@ -70,7 +70,7 @@ function clog_view_logfile() { | ||||
$logfile = read_config_option('path_cactilog'); | $logfile = $requestedFile; | ||||
} | |||||
if ($logfile == '') { | } elseif ($logfile == '') { | ||||
- $logfile = './log/cacti.log'; | - $logfile = $config['base_path'] . '/log/cacti.log'; | ||||
+ $logfile = '/var/log/cacti/log'; | + $logfile = '/var/log/cacti/log'; | ||||
} | } | ||||
/* helps determine output color */ | /* ================= input validation and session storage ================= */ |