Working in the improvements. Incident#1574
This commit is contained in:
parent
61aee8d419
commit
8633186b0e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue