Skip to content

Commit a98604e

Browse files
fix variable camel case
Signed-off-by: Lorenzo Tanganelli <lorenzo.tanganelli@hotmail.it> Signed-off-by: Lorenzo Tanganelli <lorenzo.tanganelli@hotmail.it>
1 parent 57803e4 commit a98604e

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

apps/dav/lib/Upload/UploadHome.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,39 +102,39 @@ private function getView() {
102102
$config = \OC::$server->get(IConfig::class);
103103

104104
$allowSymlinks = $config->getSystemValueBool('localstorage.allowsymlinks', false);
105-
$uploadsDirectory = $config->getSystemValueString('uploadsdirectory', '');
106-
$user_path = '/' . $user->getUID() . '/uploads';
107-
$absoluteUserPath = $rootView->getLocalFile($user_path);
105+
$uploadsPath = $config->getSystemValueString('uploads_path', '');
106+
$userPath = '/' . $user->getUID() . '/uploads';
107+
$absoluteUserPath = $rootView->getLocalFile($userPath);
108108

109-
if ($allowSymlinks && $uploadsDirectory !== '' && $absoluteUserPath) {
110-
$upload_user_path = $uploadsDirectory . $user_path;
109+
if ($allowSymlinks && $uploadsPath !== '' && $absoluteUserPath) {
110+
$uploadUserPath = $uploadsPath . $userPath;
111111

112-
if (!$rootView->file_exists($user_path) || !is_link($absoluteUserPath) || ($upload_user_path != realpath($absoluteUserPath)) ) {
112+
if (!$rootView->file_exists($userPath) || !is_link($absoluteUserPath) || ($uploadUserPath != realpath($absoluteUserPath)) ) {
113113

114-
if (!is_dir($upload_user_path)) {
115-
mkdir($upload_user_path, 0750, true);
114+
if (!is_dir($uploadUserPath)) {
115+
mkdir($uploadUserPath, 0750, true);
116116
}
117117

118-
// useful if link is broken due to $upload_user_path changes
118+
// useful if link is broken due to $uploadUserPath changes
119119
if (is_link($absoluteUserPath)) {
120120
unlink($absoluteUserPath);
121121
} elseif (is_dir($absoluteUserPath)) {
122-
$rootView->rmdir($user_path);
122+
$rootView->rmdir($userPath);
123123
}
124-
symlink($upload_user_path, $absoluteUserPath);
124+
symlink($uploadUserPath, $absoluteUserPath);
125125

126126
}
127127

128128
} else {
129129
if ($absoluteUserPath && is_link($absoluteUserPath)) {
130130
unlink($absoluteUserPath);
131131
}
132-
if (!$rootView->file_exists($user_path)) {
133-
$rootView->mkdir($user_path);
132+
if (!$rootView->file_exists($userPath)) {
133+
$rootView->mkdir($userPath);
134134
}
135135
}
136136

137-
return new View($user_path);
137+
return new View($userPath);
138138
}
139139

140140
private function getStorage() {

config/config.sample.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,12 +1898,12 @@
18981898
'updatedirectory' => '',
18991899

19001900
/**
1901-
* Override where Nextcloud stores uploads user files while uploading (chunks). Useful in situations
1901+
* Override where Nextcloud stores uploaded user files while uploading (chunks). Useful in situations
19021902
* where the default `<user_id>/uploads` is on network disk like NFS.
1903-
* Defaults to the value of `` if unset. Require `localstorage.allowsymlinks` set to `true` because
1903+
* Defaults to the value of '' if unset. Require `localstorage.allowsymlinks` set to `true` because
19041904
* impementation require symlink to works.
19051905
*/
1906-
'uploadsdirectory' => '',
1906+
'uploads_path' => '',
19071907

19081908
/**
19091909
* Blacklist a specific file or files and disallow the upload of files

0 commit comments

Comments
 (0)