From 54b8d4d822762221f97e160f6af608d8f477c32d Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 27 Aug 2018 17:10:48 +0200 Subject: [PATCH] Added extra parameter in parse_plugin_cfg This is used when no parsing of the values is required. E.g. when values are folder names with special characters --- plugins/dynamix/include/Wrappers.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/dynamix/include/Wrappers.php b/plugins/dynamix/include/Wrappers.php index f2859ef3d..54105c1c1 100644 --- a/plugins/dynamix/include/Wrappers.php +++ b/plugins/dynamix/include/Wrappers.php @@ -14,12 +14,12 @@ $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; // Wrapper functions -function parse_plugin_cfg($plugin, $sections=false) { +function parse_plugin_cfg($plugin, $sections=false, $scanner=INI_SCANNER_NORMAL) { global $docroot; $ram = "$docroot/plugins/$plugin/default.cfg"; $rom = "/boot/config/plugins/$plugin/$plugin.cfg"; - $cfg = file_exists($ram) ? parse_ini_file($ram, $sections) : []; - return file_exists($rom) ? array_replace_recursive($cfg, parse_ini_file($rom, $sections)) : $cfg; + $cfg = file_exists($ram) ? parse_ini_file($ram, $sections, $scanner) : []; + return file_exists($rom) ? array_replace_recursive($cfg, parse_ini_file($rom, $sections, $scanner)) : $cfg; } function parse_cron_cfg($plugin, $job, $text = "") { $cron = "/boot/config/plugins/$plugin/$job.cron";