bugfix: addhost (web) snmp v3 not used first (#11536)

* Update addhost.inc.php

bugfix: push snmp v3 user settings to the front of the config array and not the back.

To reproduce the bug:
Force add new snmp v3 device.
The v3 settings added to the database will not be the same as entered in the webpage

* Update addhost.inc.php

Minor change in order to trigger travis build
This commit is contained in:
Lars Elgtvedt Susaas
2020-05-12 22:49:39 +02:00
committed by GitHub
parent 5e6d371e42
commit aca95b5554

View File

@@ -67,11 +67,11 @@ if (!empty($_POST['hostname'])) {
);
$v3_config = Config::get('snmp.v3');
array_push($v3_config, $v3);
array_unshift($v3_config, $v3);
Config::set('snmp.v3', $v3_config);
$snmpver = 'v3';
print_message("Adding SNMPv3 host $hostname port $port");
print_message("Adding SNMPv3 host: $hostname port: $port");
} else {
print_error('Unsupported SNMP Version. There was a dropdown menu, how did you reach this error ?');
}//end if