2012-03-01 Vanessa Gil <vanessa.gil@artica.es>
* godmode/reporting/reporting_builder.preview.php: Fixed bug: When you delete an agent or module, its reports show errors. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5680 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f5b84eabaa
commit
4fb887be93
|
@ -1,3 +1,8 @@
|
|||
2012-03-01 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* godmode/reporting/reporting_builder.preview.php: Fixed bug: When
|
||||
you delete an agent or module, its reports show errors.
|
||||
|
||||
2012-02-29 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor_common.php: Export server
|
||||
|
|
|
@ -183,6 +183,39 @@ switch ($config["dbtype"]) {
|
|||
|
||||
if ($contents === false) {
|
||||
return;
|
||||
} else {
|
||||
foreach($contents as $content) {
|
||||
$id_report = $content['id_rc'];
|
||||
switch ($content['type']) {
|
||||
case 'SLA':
|
||||
$sql = "SELECT * FROM treport_content_sla_combined WHERE id_report_content=$id_report";
|
||||
$items_sla = db_get_all_rows_sql($sql);
|
||||
if ($items_sla === false) {
|
||||
$items_sla = array();
|
||||
}
|
||||
foreach($items_sla as $item) {
|
||||
$delete_pending = db_get_value('delete_pending', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']);
|
||||
if ($delete_pending) {
|
||||
$result = db_process_sql_delete('treport_content_sla_combined', array('id'=>$item['id']));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = "SELECT * FROM treport_content_item WHERE id_report_content=$id_report";
|
||||
$items = db_get_all_rows_sql($sql);
|
||||
if ($items === false) {
|
||||
$items = array();
|
||||
}
|
||||
foreach($items as $item) {
|
||||
$delete_pending = db_get_value('delete_pending', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']);
|
||||
if ($delete_pending) {
|
||||
$result = db_process_sql_delete('treport_content_item', array('id'=>$item['id']));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($contents as $content) {
|
||||
|
|
Loading…
Reference in New Issue