aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-07-08 21:47:16 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-07-08 21:47:16 +0200
commitc7d9636e82c88d30fd7346af819d303dc3d09592 (patch)
tree580e20c7d98dbd42abd3d8a1a98835049b417f86
parentce5cb5ac339be6c0471576b0ba310e96c1302f0a (diff)
downloadnextcloud-server-c7d9636e82c88d30fd7346af819d303dc3d09592.tar.gz
nextcloud-server-c7d9636e82c88d30fd7346af819d303dc3d09592.zip
Kill another unneeded translation
We should only translate things when we actually need them. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/legacy/OC_Util.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index ae1b28d5bb0..8d2bf477d52 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -998,23 +998,21 @@ class OC_Util {
if (\OC::$server->getConfig()->getSystemValue('check_data_directory_permissions', true) === false) {
return [];
}
- $l = \OC::$server->getL10N('lib');
- $errors = [];
- $permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
- . ' cannot be listed by other users.');
+
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
if (substr($perms, -1) !== '0') {
chmod($dataDirectory, 0770);
clearstatcache();
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
if ($perms[2] !== '0') {
- $errors[] = [
+ $l = \OC::$server->getL10N('lib');
+ return [
'error' => $l->t('Your data directory is readable by other users'),
- 'hint' => $permissionsModHint
+ 'hint' => $l->t('Please change the permissions to 0770 so that the directory cannot be listed by other users.'),
];
}
}
- return $errors;
+ return [];
}
/**