2014-07-10 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_api.php: restored the parameter name server in
	the api call "set_new_agent", thanks KOSAKA.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10332 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-07-10 09:10:30 +00:00
parent 524019b690
commit 700f0a8055
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2014-07-10 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: restored the parameter name server in
the api call "set_new_agent", thanks KOSAKA.
2014-07-10 Junichi Satoh <junichi@rworks.jp>
* include/help/ja/help_snmp_alert_field1.php: Updated help.

View File

@ -806,7 +806,8 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) {
$cascadeProtection = $other['data'][4];
$intervalSeconds = $other['data'][5];
$idOS = $other['data'][6];
$idServer = $other['data'][7];
//$idServer = $other['data'][7];
$nameServer = $other['data'][7];
$customId = $other['data'][8];
$learningMode = $other['data'][9];
$disabled = $other['data'][10];
@ -815,12 +816,12 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) {
switch ($config["dbtype"]) {
case "mysql":
$sql1 = 'SELECT name
FROM tserver WHERE id_server =' . $idServer;
FROM tserver WHERE name LIKE "' . $nameServer . '"';
break;
case "postgresql":
case "oracle":
$sql1 = 'SELECT name
FROM tserver WHERE id_server =' . $idServer;
FROM tserver WHERE name LIKE \'' . $nameServer . '\'';
break;
}