From 92c2bbee0b2138fe535b200e2ae0122ee8dc5c52 Mon Sep 17 00:00:00 2001 From: Rolf Allard van Hagen Date: Tue, 6 Feb 2024 17:42:07 +0100 Subject: [PATCH] Save $CONFIG to config.php if it exists 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 ca73f9d..e8fb351 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -3502,7 +3502,8 @@ class FM_Zipper_Tar 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 = "