diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-12-08 14:28:41 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-12-08 14:28:41 +0300 |
commit | 8ffd4428bbe5791e5353bd9d60d0a3127adcb332 (patch) | |
tree | 40fb4a889778eb0a6d2d401dff5e2c72574c671e | |
parent | 8e684f76e5d599917b52ddfd0ea1d58e31222487 (diff) |
Fallback to "default" and check if directory exists
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | config/config.sample.php | 3 | ||||
-rw-r--r-- | lib/private/legacy/util.php | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 59fb1d13610..0e69264b0db 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -244,7 +244,7 @@ $CONFIG = array( * skeleton files. * ``{lang}`` can be used as a placeholder for the language of the user. * If the directory does not exist, it falls back to non dialect (from ``de_DE`` - * to ``de``). If that does not exist either, it falls back to ``en`` + * to ``de``). If that does not exist either, it falls back to ``default`` * * Defaults to ``core/skeleton`` in the Nextcloud directory. */ @@ -866,6 +866,7 @@ $CONFIG = array( /** * custom path for LibreOffice/OpenOffice binary * + * * Defaults to ``''`` (empty string) */ 'preview_libreoffice_path' => '/usr/bin/libreoffice', diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index b9a7706eaf7..eb833862edc 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -389,7 +389,10 @@ class OC_Util { $skeletonDirectory = str_replace('{lang}', substr($userLang, 0, $dialectStart), $plainSkeletonDirectory); } if ($dialectStart === false || !file_exists($skeletonDirectory)) { - $skeletonDirectory = str_replace('{lang}', 'en', $plainSkeletonDirectory); + $skeletonDirectory = str_replace('{lang}', 'default', $plainSkeletonDirectory); + } + if (!file_exists($skeletonDirectory)) { + $skeletonDirectory = ''; } } |