Merge branch 'ent-7747-bug-en-descarga-de-plugins' into 'develop'

Plugins get file correct downlad link

See merge request artica/pandorafms!4247
This commit is contained in:
Daniel Rodriguez 2021-08-27 10:49:36 +00:00
commit a0ff35670b
2 changed files with 5 additions and 1 deletions

View File

@ -740,7 +740,7 @@ function filemanager_file_explorer(
if ((!$fileinfo['is_dir']) && ($download_button)) {
$filename = base64_encode($fileinfo['name']);
$hash = md5($filename.$config['server_unique_identifier']);
$data[4] .= '<a href="include/get_file.php?file='.urlencode($filename).'&hash='.$hash.'" style="vertical-align: 25%;">';
$data[4] .= '<a href="'.$hack_metaconsole.'include/get_file.php?file='.urlencode($filename).'&hash='.$hash.'" style="vertical-align: 25%;">';
$data[4] .= html_print_image('images/file.png', true, ['class' => 'invert_filter']);
$data[4] .= '</a>';
}

View File

@ -55,6 +55,10 @@ if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['server_uniq
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/files_repo/'.$file;
break;
case 'godmode/servers/plugin':
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/plugin/'.$file;
break;
case $main_collections:
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/collection/'.$file;
break;