mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-03 14:23:14 +02:00
Add environmental variables for configuration
This commit is contained in:
parent
5ebea63410
commit
1d5dc40543
|
@ -138,10 +138,11 @@ if (getenv('TFM_USE_AUTH') !== false) {
|
|||
}
|
||||
|
||||
if (getenv('TFM_AUTH_USERS') !== false) {
|
||||
$auth_users = array_map(
|
||||
function($x) { return explode('=', $x); },
|
||||
explode(',', getenv('TFM_AUTH_USERS'))
|
||||
);
|
||||
$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) {
|
||||
|
|
Loading…
Reference in a new issue