Merge branch '2920-No-funciona-el-wizard-para-crear-agentes-desde-la-metaconsola' into 'develop'

Changed function that creates a new agent from metaconsole to set field name…

See merge request artica/pandorafms!1873
This commit is contained in:
vgilc 2018-10-19 11:30:47 +02:00
commit b7f9149c20
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ function agents_create_agent ($name, $id_group, $interval, $ip_address, $values
if (! is_array ($values))
$values = array ();
$values['nombre'] = $name;
$values['alias'] = $name;
$values['nombre'] = hash("sha256",$name . "|" .$ip_address ."|". time() ."|". sprintf("%04d", rand(0,10000)));
$values['id_grupo'] = $id_group;
$values['intervalo'] = $interval;