diff --git a/tinyfilemanager.php b/tinyfilemanager.php index e7f693d..68703d8 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -136,6 +136,22 @@ $ip_blacklist = array( '::' // non-routable meta ipv6 ); +// External scripts (replace for GDPR compliance) +$external = array( + 'css-bootstrap' => '', + 'css-dropzone' => '', + 'css-font-awesome' => '', + 'css-highlightjs' => '', + 'js-ace' => '', + 'js-bootstrap' => '', + 'js-dropzone' => '', + 'js-jquery' => '', + 'js-jquery-datables' => '', + 'js-highlightjs' => '', + 'pre-jsdelivr' => '', + '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'; @@ -145,6 +161,18 @@ if (is_readable($config_file)) { // --- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL --- +function print_external($key) { + global $external; + + if(!array_key_exists($key, $external)) { + // throw new Exception('Key missing in external: ' . key); + echo ""; + return; + } + + echo "$external[$key]"; +} + // max upload file size define('MAX_UPLOAD_SIZE', $max_upload_size_bytes); @@ -1296,7 +1324,7 @@ if (isset($_GET['upload']) && !FM_READONLY) { return ''; } ?> - +
@@ -1338,7 +1366,7 @@ if (isset($_GET['upload']) && !FM_READONLY) {
- + - + + '; } ?> <?php echo fm_enc(APP_TITLE) ?> - - - - - - + + + + - +