Merge branch 'ent-5552-error-descarga-colecciones-consola' into 'develop'
Avoid collections case for files download Closes pandora_enterprise#5552 See merge request artica/pandorafms!3093
This commit is contained in:
commit
1275a550bc
|
@ -41,9 +41,12 @@ if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['dbpass']) |
|
||||||
$downloadable_file = '';
|
$downloadable_file = '';
|
||||||
$parse_all_queries = explode('&', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY));
|
$parse_all_queries = explode('&', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY));
|
||||||
$parse_sec2_query = explode('=', $parse_all_queries[1]);
|
$parse_sec2_query = explode('=', $parse_all_queries[1]);
|
||||||
|
// Metaconsole have a route distinct than node.
|
||||||
|
$main_file_manager = (is_metaconsole() === true) ? 'advanced/metasetup' : 'godmode/setup/file_manager';
|
||||||
|
$main_collections = (is_metaconsole() === true) ? 'advanced/collections' : 'enterprise/godmode/agentes/collections';
|
||||||
if ($parse_sec2_query[0] === 'sec2') {
|
if ($parse_sec2_query[0] === 'sec2') {
|
||||||
switch ($parse_sec2_query[1]) {
|
switch ($parse_sec2_query[1]) {
|
||||||
case 'godmode/setup/file_manager':
|
case $main_file_manager:
|
||||||
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/'.$file;
|
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/'.$file;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -51,6 +54,10 @@ if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['dbpass']) |
|
||||||
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/files_repo/'.$file;
|
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/files_repo/'.$file;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case $main_collections:
|
||||||
|
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/collection/'.$file;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$downloadable_file = '';
|
$downloadable_file = '';
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|
Loading…
Reference in New Issue