Lowercase "data" correctly

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-04-10 11:13:46 +02:00
parent bee0a3699e
commit 9e3a3eebf9
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 6 additions and 6 deletions

View File

@ -711,7 +711,7 @@ class OC_Util {
. '%sgiving the webserver write access to the root directory%s.', . '%sgiving the webserver write access to the root directory%s.',
['<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank" rel="noreferrer">', '</a>']); ['<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank" rel="noreferrer">', '</a>']);
$errors[] = [ $errors[] = [
'error' => 'Your Data directory is not writable', 'error' => 'Your data directory is not writable',
'hint' => $permissionsHint 'hint' => $permissionsHint
]; ];
} else { } else {
@ -923,13 +923,13 @@ class OC_Util {
$permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory' $permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
. ' cannot be listed by other users.'); . ' cannot be listed by other users.');
$perms = substr(decoct(@fileperms($dataDirectory)), -3); $perms = substr(decoct(@fileperms($dataDirectory)), -3);
if (substr($perms, -1) != '0') { if (substr($perms, -1) !== '0') {
chmod($dataDirectory, 0770); chmod($dataDirectory, 0770);
clearstatcache(); clearstatcache();
$perms = substr(decoct(@fileperms($dataDirectory)), -3); $perms = substr(decoct(@fileperms($dataDirectory)), -3);
if (substr($perms, 2, 1) != '0') { if ($perms[2] !== '0') {
$errors[] = [ $errors[] = [
'error' => $l->t('Your Data directory is readable by other users'), 'error' => $l->t('Your data directory is readable by other users'),
'hint' => $permissionsModHint 'hint' => $permissionsModHint
]; ];
} }
@ -949,13 +949,13 @@ class OC_Util {
$errors = []; $errors = [];
if ($dataDirectory[0] !== '/') { if ($dataDirectory[0] !== '/') {
$errors[] = [ $errors[] = [
'error' => $l->t('Your Data directory must be an absolute path'), 'error' => $l->t('Your data directory must be an absolute path'),
'hint' => $l->t('Check the value of "datadirectory" in your configuration') 'hint' => $l->t('Check the value of "datadirectory" in your configuration')
]; ];
} }
if (!file_exists($dataDirectory . '/.ocdata')) { if (!file_exists($dataDirectory . '/.ocdata')) {
$errors[] = [ $errors[] = [
'error' => $l->t('Your Data directory is invalid'), 'error' => $l->t('Your data directory is invalid'),
'hint' => $l->t('Please check that the data directory contains a file' . 'hint' => $l->t('Please check that the data directory contains a file' .
' ".ocdata" in its root.') ' ".ocdata" in its root.')
]; ];