2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_modules.php: Some mofications over update_tag function. * include/functions_alerts.php: Added new function alerts_get_alerts_module_name() to retrieve alerts of a module in html select tag format. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c4a067a340
commit
7e1795ca4a
|
@ -1,3 +1,11 @@
|
||||||
|
2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* include/functions_modules.php: Some mofications over update_tag
|
||||||
|
function.
|
||||||
|
* include/functions_alerts.php: Added new function
|
||||||
|
alerts_get_alerts_module_name() to retrieve alerts of a module
|
||||||
|
in html select tag format.
|
||||||
|
|
||||||
2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_tags.php: Added new parameters to function
|
* include/functions_tags.php: Added new parameters to function
|
||||||
|
|
|
@ -934,6 +934,26 @@ function alerts_get_alerts_agent_module ($id_agent_module, $disabled = false, $f
|
||||||
$filter, $fields);
|
$filter, $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get alert associated to a module (only id and name fields).
|
||||||
|
*
|
||||||
|
* @param int Id of an alert template.
|
||||||
|
* @param bool Disabled or not.
|
||||||
|
*
|
||||||
|
* @return mixed Affected rows or false if something goes wrong.
|
||||||
|
*/
|
||||||
|
function alerts_get_alerts_module_name ($id_agent_module, $disabled = false) {
|
||||||
|
$id_alert_agent_module = safe_int ($id_agent_module, 0);
|
||||||
|
|
||||||
|
$sql = sprintf ('SELECT a.id, b.name
|
||||||
|
FROM talert_template_modules as a, talert_templates as b
|
||||||
|
WHERE a.id=b.id AND a.id_agent_module = %d AND a.disabled = %d',
|
||||||
|
$id_agent_module, (int)$disabled);
|
||||||
|
|
||||||
|
return db_process_sql($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get disabled field of talert_template_modules table.
|
* Get disabled field of talert_template_modules table.
|
||||||
*
|
*
|
||||||
|
|
|
@ -185,11 +185,12 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false
|
||||||
if (isset ($values['nombre']) && empty ($values['nombre']))
|
if (isset ($values['nombre']) && empty ($values['nombre']))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$return_tag = tags_update_module_tag ($id, $tags);
|
if ($tags !== false)
|
||||||
|
$return_tag = tags_update_module_tag ($id, $tags);
|
||||||
|
|
||||||
if ($return_tag === false){
|
// if ($return_tag === false){
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if ($onlyNoDeletePending) {
|
if ($onlyNoDeletePending) {
|
||||||
return (@db_process_sql_update ('tagente_modulo', $values,
|
return (@db_process_sql_update ('tagente_modulo', $values,
|
||||||
|
|
Loading…
Reference in New Issue