mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Fixed the update the tags. Ticket # 1417
This commit is contained in:
parent
35a02f3eb8
commit
25bed01edb
@ -349,8 +349,25 @@ function modules_delete_agent_module ($id_agent_module) {
|
|||||||
* @return True if the module was updated. False if not.
|
* @return True if the module was updated. False if not.
|
||||||
*/
|
*/
|
||||||
function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false, $tags = false) {
|
function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false, $tags = false) {
|
||||||
|
|
||||||
|
$update_tags = false;
|
||||||
|
$return_tag = true;
|
||||||
|
if ($tags !== false) {
|
||||||
|
$update_tags = true;
|
||||||
|
$return_tag = tags_update_module_tag ($id, $tags);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($return_tag === false) {
|
||||||
|
return ERR_DB;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_array ($values) || empty ($values)) {
|
if (!is_array ($values) || empty ($values)) {
|
||||||
return ERR_GENERIC;
|
if ($update_tags) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return ERR_GENERIC;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset ($values['nombre'])) {
|
if (isset ($values['nombre'])) {
|
||||||
@ -368,14 +385,7 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$return_tag = true;
|
|
||||||
if ($tags !== false) {
|
|
||||||
$return_tag = tags_update_module_tag ($id, $tags);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($return_tag === false) {
|
|
||||||
return ERR_DB;
|
|
||||||
}
|
|
||||||
|
|
||||||
$where = array();
|
$where = array();
|
||||||
$where['id_agente_modulo'] = $id;
|
$where['id_agente_modulo'] = $id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user