Working in the improvements. Incident#1574

This commit is contained in:
mdtrooper 2014-12-09 18:42:34 +01:00
parent 61aee8d419
commit 8633186b0e
2 changed files with 23 additions and 6 deletions

View File

@ -3249,6 +3249,23 @@ function api_set_stop_downtime($id, $thrash1, $other, $thrash3) {
returnData('string', array('type' => 'string', 'data' => __('Downtime stopped.')));
}
function api_set_tag($id, $thrash1, $other, $thrash3) {
$values = array();
$values['name'] = $id;
$values['description'] = $other['data'][0];
$values['url'] = $other['data'][1];
$values['email'] = $other['data'][2];
$values['phone'] = $other['data'][3];
$id_tag = tags_create_tag($values);
if (empty($id_tag))
returnError('error_set_tag', 'Error set tag.');
else
returnData('string',
array('type' => 'string', 'data' => $id_tag));
}
/**
* Add agent to a policy. And return a message with the result of the operation.
*
@ -3264,7 +3281,7 @@ function api_set_stop_downtime($id, $thrash1, $other, $thrash3) {
*
* @param $thrash3 Don't use
*/
function api_set_add_agent_policy($id, $thrash1, $other, $thrash3) {
function api_set_add_agent_policy($id, $thrash1, $other, $thrash2) {
if ($id == "") {
returnError('error_add_agent_policy', __('Error adding agent to policy. Id_policy cannot be left blank.'));
return;

View File

@ -203,7 +203,7 @@ function tags_create_tag($values) {
return false;
}
return db_process_sql_insert('ttag',$values);
return db_process_sql_insert('ttag', $values);
}
/**