From 62a3ee61490416881e256157e03a8a211fe74b6e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 17 Aug 2023 06:39:34 -0400 Subject: [PATCH] v2.16 - Added auto-creation of IMAGES directory if not present --- mailGraph.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mailGraph.php b/mailGraph.php index 936a614..c3eefa8 100644 --- a/mailGraph.php +++ b/mailGraph.php @@ -683,7 +683,7 @@ $z_tmp_cookies = $z_path.'tmp/'; $z_log_path = $z_path.'log/'; - // If tmp or log does not exist, create them + // If tmp, log, or images does not exist, create them if (!is_dir($z_tmp_cookies)) { mkdir($z_tmp_cookies); @@ -696,6 +696,12 @@ _log('+ created LOG directory "'.$z_log_path.'"'); } + if (!is_dir($z_images_path)) + { + mkdir($z_images_path); + _log('+ created IMAGES directory "'.$z_images_path.'"'); + } + // Zabbix user (requires Super Admin access rights to access image generator script) $z_user = $config['zabbix_user']; $z_pass = $config['zabbix_user_pwd'];