mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_api.php: Added get_alert_template function to Api. Feature request: #3478217 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5469 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bc4a2fe041
commit
c15f7a5de3
@ -1,3 +1,10 @@
|
|||||||
|
2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* include/functions_api.php: Added get_alert_template function to
|
||||||
|
Api.
|
||||||
|
|
||||||
|
Feature request: #3478217
|
||||||
|
|
||||||
2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* Changelog: I forgot to update Changelog.
|
* Changelog: I forgot to update Changelog.
|
||||||
|
@ -2209,6 +2209,36 @@ function set_delete_alert_template($id_template, $thrash1, $other, $thrash3) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_alert_template($id_template, $thrash1, $other, $thrash3) {
|
||||||
|
|
||||||
|
$filter_templates = false;
|
||||||
|
|
||||||
|
if ($id_template != "") {
|
||||||
|
$result_template = alerts_get_alert_template_name($id_template);
|
||||||
|
|
||||||
|
if (!$result_template){
|
||||||
|
returnError('error_get_alert_template', __('Error getting alert template. Id_template doesn\'t exists.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$filter_templates = array('id' => $id_template);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = alerts_get_alert_templates($filter_templates, array('id', 'name', 'description', 'id_alert_action', 'type', 'id_group'));
|
||||||
|
|
||||||
|
if ($template !== false) {
|
||||||
|
$data['type'] = 'array';
|
||||||
|
$data['data'] = $template;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$template) {
|
||||||
|
returnError('error_get_alert_template', __('Error getting alert template.'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
returnData('csv', $data, ';');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign a module to an alert template. And return the id of new relationship.
|
* Assign a module to an alert template. And return the id of new relationship.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user