@@ -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 () {
0 commit comments