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 2525
2626 // If true, private folders will be created for each signed-in user.
2727 'allow_multi_user ' => true ,
28+ // If true, share folder will be created when allow_multi_user is true.
29+ 'allow_share_folder ' => true ,
2830
2931 // The database column to identify a user. Make sure the value is unique.
3032 // Ex: When set to 'id', the private folder of user will be named as the user id.
104106 | Image / Folder Setting
105107 |--------------------------------------------------------------------------
106108 */
107-
109+
108110 'thumb_img_width ' => 200 ,
109111 'thumb_img_height ' => 200 ,
110112
111-
112113 /*
113114 |--------------------------------------------------------------------------
114115 | File Extension Information
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function getFolders()
2222 $ folder_types ['user ' ] = 'root ' ;
2323 }
2424
25- if (true ) {
25+ if (parent :: allowMultiUser () && parent :: enabledShareFolder () ) {
2626 $ folder_types ['share ' ] = 'shares ' ;
2727 }
2828
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ private function checkDefaultFolderExists($type = 'share')
2323 return ;
2424 }
2525
26+ if ($ type === 'share ' && (!$ this ->enabledShareFolder () || !$ this ->allowMultiUser ())) {
27+ return ;
28+ }
29+
2630 $ path = $ this ->getRootFolderPath ($ type );
2731
2832 $ this ->createFolderByPath ($ path );
Original file line number Diff line number Diff line change @@ -226,6 +226,11 @@ public function allowMultiUser()
226226 return config ('lfm.allow_multi_user ' ) === true ;
227227 }
228228
229+ public function enabledShareFolder ()
230+ {
231+ return config ('lfm.allow_share_folder ' ) === true ;
232+ }
233+
229234
230235 /****************************
231236 *** File System ***
You can’t perform that action at this time.
0 commit comments