From 14d235f78e24ee1c91370ef2c2cd840025491954 Mon Sep 17 00:00:00 2001 From: Sugeng Sulistiyawan Date: Wed, 21 Jun 2023 14:13:15 +0700 Subject: [PATCH] Ignore config.php & add offline support on config --- .gitignore | 1 + tinyfilemanager.php | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e9b47a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.php \ No newline at end of file diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 71786c9..2df987e 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -142,13 +142,6 @@ $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' => '', @@ -165,6 +158,13 @@ $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