diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 90ae0b37aa..08606522e6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-08-16 Miguel de Dios + + * godmode/db/db_sanity.php: fixes the notice php messages and warnings php + messages. And fixed the uninitialised modules erasing. + + Fixes: #3392431 + 2011-08-16 Miguel de Dios * operation/agentes/estado_monitores.php: erased the notice php messages diff --git a/pandora_console/godmode/db/db_sanity.php b/pandora_console/godmode/db/db_sanity.php index dc6cb4defc..e700c36923 100644 --- a/pandora_console/godmode/db/db_sanity.php +++ b/pandora_console/godmode/db/db_sanity.php @@ -40,7 +40,7 @@ if ($sanity == 1) { } foreach ($rows as $row) { - $id_agente_modulo = $row[0]; + $id_agente_modulo = $row['id_agente_modulo']; $id_agente = $row["id_agente"]; // check if exist in tagente_estado and create if not $sql = "SELECT COUNT(*) FROM tagente_estado @@ -68,7 +68,7 @@ if ($sanity == 1) { if ($rows !== false) { $row = reset($rows); - $count = $rows['count']; + $count = $row['count']; if ($count == 0) { echo "Deleting non-existing module $id_agente_modulo in state table
"; @@ -87,9 +87,9 @@ elseif ($sanity == 2) { } foreach ($rows as $row) { - echo "Deleting non init module $id_agente_modulo
"; + echo "Deleting non init module " . $row['id_agente_modulo'] ."
"; - db_process_sql_delete('tagente_estado', array('id_agente_modulo' => $row['id_agente_modulo'])); + modules_delete_agent_module($row['id_agente_modulo']); } echo "Deleting bad module (id 0)
";