From 1042994a601081d5e787b06834824ab7b5d54a22 Mon Sep 17 00:00:00 2001 From: Rolf Allard van Hagen Date: Mon, 14 Oct 2024 05:39:03 +0200 Subject: [PATCH] Save $CONFIG to config.php if it exists (#1144) Writes $CONFIG variable to the main plugin file, unless there is a config.php --- tinyfilemanager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index d0da09b5..e7442ad5 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -3598,7 +3598,8 @@ function __construct() function save() { - $fm_file = __FILE__; + global $config_file; + $fm_file = is_readable($config_file) ? $config_file : __FILE__; $var_name = '$CONFIG'; $var_value = var_export(json_encode($this->data), true); $config_string = "