Merge branch 'ent-9825-no-se-suben-imagenes-por-file-manager-en-meta' into 'develop'

Ent 9825 no se suben imagenes por file manager en meta

See merge request artica/pandorafms!5358
This commit is contained in:
Rafael Ameijeiras 2022-12-28 09:41:37 +00:00
commit 171fb5ed46
1 changed files with 22 additions and 0 deletions

View File

@ -967,6 +967,10 @@ function get_parameter($name, $default='')
return get_parameter_get($name, $default);
}
if (isset($_FILES[$name])) {
return get_parameter_file($name, $default);
}
return $default;
}
@ -1007,6 +1011,24 @@ function get_parameter_post($name, $default='')
}
/**
* Get a parameter from a post file request.
*
* @param string $name key of the parameter in the $_FILES array
* @param mixed $default default value if the key wasn't found
*
* @return mixed Whatever was in that parameter, cleaned however
*/
function get_parameter_file($name, $default='')
{
if ((isset($_FILES[$name])) && !empty($_FILES[$name])) {
return io_safe_input($_FILES[$name]);
}
return $default;
}
/**
* Get header.
*