mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-08 08:52:23 +02:00
Merge 1d5dc40543
into 8e87afae5b
This commit is contained in:
commit
cc6d89e265
|
@ -142,9 +142,30 @@ $ip_blacklist = array(
|
||||||
'::' // non-routable meta ipv6
|
'::' // non-routable meta ipv6
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if (getenv('TFM_USE_AUTH') !== false) {
|
||||||
|
$use_auth = filter_var(getenv('TFM_USE_AUTH'), FILTER_VALIDATE_BOOLEAN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getenv('TFM_AUTH_USERS') !== false) {
|
||||||
|
$auth_users = array();
|
||||||
|
foreach(explode(',', getenv('TFM_AUTH_USERS')) as $u) {
|
||||||
|
$u = explode('=', $u);
|
||||||
|
$auth_users[$u[0]] = $u[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getenv('TFM_READONLY_USERS') !== false) {
|
||||||
|
$readonly_users = explode(',', getenv('TFM_READONLY_USERS'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getenv('TFM_ROOT_PATH') !== false) {
|
||||||
|
$root_path = getenv('TFM_ROOT_PATH');
|
||||||
|
}
|
||||||
|
|
||||||
// if User has the external config file, try to use it to override the default config above [config.php]
|
// 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
|
// sample config - https://tinyfilemanager.github.io/config-sample.txt
|
||||||
$config_file = __DIR__.'/config.php';
|
$config_file = getenv('TFM_CONFIG_FILE') !== false ? getenv('TFM_CONFIG_FILE') : __DIR__.'/config.php';
|
||||||
if (is_readable($config_file)) {
|
if (is_readable($config_file)) {
|
||||||
@include($config_file);
|
@include($config_file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue