From dabc4ea36e0a7e26d9e3faa3435bb026d8d188fe Mon Sep 17 00:00:00 2001 From: Bryan <16054900+bmsurber@users.noreply.github.com> Date: Thu, 11 May 2023 00:25:15 -0400 Subject: [PATCH] Fix highlightjs_style in config.php being ignored (#1039) highlightjs_style variable is being used before config.php gets parsed, so preview style is always vs. This PR fixes that by moving config.php parsing to be before external resource calls. --- tinyfilemanager.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index b44acfc..67ccd50 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -142,6 +142,13 @@ $ip_blacklist = array( '::' // non-routable meta ipv6 ); +// if User has the external config file, try to use it to override the default config above [config.php] +// sample config - https://tinyfilemanager.github.io/config-sample.txt +$config_file = __DIR__.'/config.php'; +if (is_readable($config_file)) { + @include($config_file); +} + // External CDN resources that can be used in the HTML (replace for GDPR compliance) $external = array( 'css-bootstrap' => '', @@ -158,13 +165,6 @@ $external = array( 'pre-cloudflare' => '' ); -// if User has the external config file, try to use it to override the default config above [config.php] -// sample config - https://tinyfilemanager.github.io/config-sample.txt -$config_file = __DIR__.'/config.php'; -if (is_readable($config_file)) { - @include($config_file); -} - // --- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL --- // max upload file size