trippo / ResponsiveFilemanager

Completely Responsive Filemanager with integration for tinyMCE,CKEditor and CLEditor editor
http://responsivefilemanager.com
Other
815 stars 365 forks source link

Using $_SESSION["RF"]["subfolder"] Not working #515

Open smuglet opened 5 years ago

smuglet commented 5 years ago

Any way to set the subfolder when using stand-alone-file-manager? I've set the session as described "$_SESSION["RF"]["subfolder"] ="subfolder/name/" of course I've change the subfolder details... but it seem not to be listened to?

trippo commented 5 years ago

I tried and work fine please try to print $_SESSION in dialog.php

coolfocks commented 5 years ago

@smuglet you need to set SESSION subfolder as well as when calling dialog.php, put into url param fldr= (just empty, but existant)

it will act as if it really is a root folder for that specific view

smuglet commented 5 years ago

Hi, I can get it to set the initial folder using the above but it does not set it as the root folder. So you can navigate above it. The root folder appears to be defined in $config and is not changed based on any parameters passed to dialog.php presently.

If I manually edit dialog.php to alter:

$config['upload_dir']='/my/new/root/folder/'; $config['current_path']='../../../my/new/root/folder/';

Then it works as I'd like (not allowing the person to navigate up the heirachy).

I don't want to fiddle with the core code though, is there some other way to prevent navigation above the subfolder? Perhaps another setting I'm missing?

Thanks.

carbycello commented 3 years ago

Here is the only way I got it to work. I created a session variable from a logged in username. I created the directory from the username if it didn't already exist. I appended the users directory to the paths in config.php so far so good.