mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-17 21:16:38 +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) {
|
if (getenv('TFM_AUTH_USERS') !== false) {
|
||||||
$auth_users = array_map(
|
$auth_users = array();
|
||||||
function($x) { return explode('=', $x); },
|
foreach(explode(',', getenv('TFM_AUTH_USERS')) as $u) {
|
||||||
explode(',', getenv('TFM_AUTH_USERS'))
|
$u = explode('=', $u);
|
||||||
);
|
$auth_users[$u[0]] = $u[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getenv('TFM_READONLY_USERS') !== false) {
|
if (getenv('TFM_READONLY_USERS') !== false) {
|
||||||
|
|
Loading…
Reference in a new issue