We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30843
    • 4 Posts
    I want to hide some folders to client (i’m not sure it’s very well if he delete’s core or assets folder)
    For my tab "Files" I fixed it using hard-coded path, because I didn’t found solution on site or System settings ("Area : Filesystem / File Manager Path" doen’t seems to have any effect).

    My fix :
    REvolution 2.0.0.rc1

    * Create a folder www.mydomainroot.tld/upload (with write permission of course) and 2 subfolders (documents and images)
    * Edit www.mydomainroot.tld/core/model/modx/processors/browser/directory/getlist.php (line 33)

    Original :
    $fullpath = $root.($dir != ’’ ? $dir : ’’);

    Modified
    $fullpath = $root.($dir != ’’ ? $dir : ’’).’/upload’;



    I’m pretty sure there is a better way to do that (limited access to a default folder), using the l.21
    $dir = !isset($scriptProperties[’id’]) || $scriptProperties[’id’] == ’root’ ? ’’ : str_replace(’n_’,’’,$scriptProperties[’id’]);
    but i haven’t discovered yet where is $scriptProperties initialized...

    Submit your solutions, if any, please laugh
      • 28215
      • 4,149 Posts
      This has been fixed in SVN; the SVN version of Revo (and RC2, when it comes out), respects the ’filemanager_path’ setting, where you can use as a User Setting where the user can be restricted to a certain directory.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 28215
        • 4,149 Posts
        And fyi, $scriptProperties is basically just the POST and REQUEST variables sanitized and merged into an array for the processors.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 30843
          • 4 Posts
          OK thank you ! Flaggued as SOLVED