1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 18:14:00 +02:00

Merge pull request #152 from novashdima/master

Small compiler & Readme fixes
This commit is contained in:
Marco Dickert
2020-10-01 23:39:04 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ The IFM uses the following resources:
* fileinfo
* json
* ldap (only if LDAP based authentication is used)
* mbstring
* openssl (for remote uploads from https sources)
* phar
* posix

View File

@@ -37,7 +37,11 @@ foreach ($options as $key => $value)
if (substr($key, 0, 4) == "lang")
$langs = array_merge($langs, explode(",", $value));
$langs = array_unique($langs);
if (!empty($langs)) {
$vars['default_lang'] = ($langs[0] == "all") ? "en" : $langs[0];
} else {
$vars['default_lang'] = "en";
}
// ensure english is available, as it gets merged with the other languages
// in case of missing keys in other languages.
if (!in_array("all", $langs) || !in_array("en", $langs))
@@ -45,7 +49,7 @@ if (!in_array("all", $langs) || !in_array("en", $langs))
if (in_array("all", $langs))
$langs = array_map(
function($i) { return str_replace("src/i18n/", "", str_replace(".json", "", $i)); },
function($lang_file) {return pathinfo($lang_file)['filename']; },
glob("src/i18n/*.json")
);