Marco Magnanini

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
in reply to: permission-denied.txt #196814

Marco Magnanini
Participant

Ok, we found the problem in the trigger_download function in the download-manager/src/__/Apply.php file
This is the change we made:

global $wpdb, $current_user, $wp_query;

if ( preg_match( “/\/download\/([\d]+)\/(.+)\/(.*)/”, $_SERVER[‘REQUEST_URI’], $matched ) && !empty($_GET[‘filename’]) ) {
$_REQUEST[‘wpdmdl’] = $_GET[‘wpdmdl’] = (int) $matched[1];
$_REQUEST[‘ind’] = $_GET[‘ind’] = (int) $matched[2];
$wp_query->query_vars[‘wpdmdl’] = (int) $matched[1];
$wp_query->query_vars[‘ind’] = (int) $matched[2];
}
else if ( preg_match( “/\/download\/([\d]+)\/(.*)/”, $_SERVER[‘REQUEST_URI’], $matched ) && !empty($_GET[‘filename’]) ) {
$_REQUEST[‘wpdmdl’] = $_GET[‘wpdmdl’] = (int) $matched[1];
$wp_query->query_vars[‘wpdmdl’] = (int) $matched[1];
}

In this way, if the Download content type only has a number in the URL, the download is not forced (which was wrong anyway because it took the URL as if it were the file ID), but displays the content and allows download individual files.
Now, with this change, we have solved the problem, can you implement it in the next version of the plugin?
Thanks.

in reply to: permission-denied.txt #196811

Marco Magnanini
Participant

No, we have not made any changes other than the normal plugin update. What could it have been? Thank you.

in reply to: permission-denied.txt #196807

Marco Magnanini
Participant

OK, thanks. However, we have had active links with only the number for at least 1 year. They always led to the page correctly. What can be changed? Could it have been something in the latest plugin update?
Thanks.

in reply to: permission-denied.txt #196787

Marco Magnanini
Participant
This reply has been marked as private.
in reply to: permission-denied.txt #196752

Marco Magnanini
Participant
This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)