• Resolved thewebcoder

    (@thewebcoder)


    Hi,

    One more for you, I’m afraid.

    With redirect = True, if I click on a file name it properly redirects to login. However, if I select multiple files and click download, it bypasses the login requirement. Is there a way to have redirect = True redirect when the user attempts to select multiple files or (alternately) when multiple files are selected and “Download” is clicked?

    Thank you!

    https://www.ads-software.com/plugins/file-away/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author thomstark

    (@thomstark)

    That’s an oversight on my part. A slight mod to a source file will fix.

    Open up wp-content/plugins/file-away/lib/cls/class.fileaway.php

    On line 40, you’ll see this line:

    $bulkclass = $bulkdownload ? 'bd-table' : ($manager ? 'mngr-table' : null);

    Cut (CTRL+X) that line, then go down to line 59 (58 if you cut line 40 including the blank space), which looks like this:

    include fileaway_dir.'/lib/inc/inc.precontent.php';

    Directly above that line, paste the line you cut, and above that, add another line, so it should look like this:

    $bulkdownload = $redirect ? false : $bulkdownload;
    $bulkclass = $bulkdownload ? 'bd-table' : ($manager ? 'mngr-table' : null);

    In the immediate context of the lines above and below it will look like this:

    include fileaway_dir.'/lib/inc/inc.stats-redirects.php';
    $bulkdownload = $redirect ? false : $bulkdownload;
    $bulkclass = $bulkdownload ? 'bd-table' : ($manager ? 'mngr-table' : null);
    include fileaway_dir.'/lib/inc/inc.precontent.php';

    Save and reload your page. Bulk Downloads will be disabled if redirect is set to true and user is not logged in.

    Thread Starter thewebcoder

    (@thewebcoder)

    I made the update to the PHP and tested both login and logged out states. Success!

    Thanks so much. I hope this is rolled into the next update!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect = True, but Bulk Download Still Enabled?’ is closed to new replies.