Merge branch 'ent-3805-nombre-agente-guarda-sin-guion' into 'develop'

Fix agent name input to allow '-'

See merge request artica/pandorafms!2319

Former-commit-id: 9496fa004ee36b8d09c875a77cf3f19bec45a130
This commit is contained in:
Daniel Rodriguez 2019-04-01 18:49:11 +02:00
commit ee6d8642f3
1 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ $module_macros = [];
if ($create_agent) {
$mssg_warning = 0;
$alias_safe_output = io_safe_output(get_parameter('alias', ''));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $alias_safe_output)));
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post('direccion', '');
$unique_ip = (int) get_parameter_post('unique_ip', 0);
@ -766,7 +766,7 @@ if ($update_agent) {
$id_agente = (int) get_parameter_post('id_agente');
$nombre_agente = str_replace('`', '‘', (string) get_parameter_post('agente', ''));
$alias_safe_output = io_safe_output(get_parameter('alias', ''));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $alias_safe_output)));
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post('direccion', '');
$unique_ip = (int) get_parameter_post('unique_ip', 0);