From 306090be65f0006ccc933b8459157a8a4c410b91 Mon Sep 17 00:00:00 2001 From: maestrow Date: Fri, 26 Nov 2021 01:02:12 +0300 Subject: [PATCH] replace hardcoded configuration path '/config.php' with CONFIG_FILE named constant. Thus you can embed file manager with different configs. --- tinyfilemanager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 3d7052a..05940a9 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -127,9 +127,8 @@ $ip_blacklist = array( ); // if User has the customized config file, try to use it to override the default config above -$config_file = __DIR__.'/config.php'; -if (is_readable($config_file)) { - @include($config_file); +if (defined('CONFIG_FILE') && is_readable(CONFIG_FILE))) { + @include(CONFIG_FILE); } // --- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL ---