File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 25
25
26
26
// If true, private folders will be created for each signed-in user.
27
27
'allow_multi_user ' => true ,
28
+ // If true, share folder will be created when allow_multi_user is true.
29
+ 'allow_share_folder ' => true ,
28
30
29
31
// The database column to identify a user. Make sure the value is unique.
30
32
// Ex: When set to 'id', the private folder of user will be named as the user id.
104
106
| Image / Folder Setting
105
107
|--------------------------------------------------------------------------
106
108
*/
107
-
109
+
108
110
'thumb_img_width ' => 200 ,
109
111
'thumb_img_height ' => 200 ,
110
112
111
-
112
113
/*
113
114
|--------------------------------------------------------------------------
114
115
| File Extension Information
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function getFolders()
22
22
$ folder_types ['user ' ] = 'root ' ;
23
23
}
24
24
25
- if (true ) {
25
+ if (parent :: allowMultiUser () && parent :: enabledShareFolder () ) {
26
26
$ folder_types ['share ' ] = 'shares ' ;
27
27
}
28
28
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ private function checkDefaultFolderExists($type = 'share')
23
23
return ;
24
24
}
25
25
26
+ if ($ type === 'share ' && (!$ this ->enabledShareFolder () || !$ this ->allowMultiUser ())) {
27
+ return ;
28
+ }
29
+
26
30
$ path = $ this ->getRootFolderPath ($ type );
27
31
28
32
$ this ->createFolderByPath ($ path );
Original file line number Diff line number Diff line change @@ -226,6 +226,11 @@ public function allowMultiUser()
226
226
return config ('lfm.allow_multi_user ' ) === true ;
227
227
}
228
228
229
+ public function enabledShareFolder ()
230
+ {
231
+ return config ('lfm.allow_share_folder ' ) === true ;
232
+ }
233
+
229
234
230
235
/****************************
231
236
*** File System ***
You can’t perform that action at this time.
0 commit comments