From 4e8d2677e10158729743526b42e1f885c54025a6 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 14 Apr 2010 07:59:52 +0000 Subject: [PATCH] 2010-04-14 Sergio Martin * godmode/reporting/map_builder.php: Added Delete visual console for Bug 2986523 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2559 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/reporting/map_builder.php | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e8c3c4ae64..fe658f273a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-04-14 Sergio Martin + + * godmode/reporting/map_builder.php: Added Delete visual console + for Bug 2986523 + 2010-04-14 Sergio Martin * ChangeLog: Updated the Changlog with the last forget commit diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 87895ea590..d62fcfdc9d 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -19,6 +19,19 @@ print_page_header (__('Visual console builder'), "", false, "map_builder", true) $id_layout = (int) get_parameter ('id_layout'); $copy_layout = (bool) get_parameter ('copy_layout'); +$delete_layout = (bool) get_parameter ('delete_layout'); + +if ($delete_layout) { + process_sql_delete ('tlayout_data', array ('id_layout' => $id_layout)); + $result = process_sql_delete ('tlayout', array ('id' => $id_layout)); + if ($result) { + echo '

'.__('Successfully deleted').'

'; + clean_cache(); + } else { + echo '

'.__('Not deleted. Error deleting data').'

'; + } + $id_layout = 0; +} if ($copy_layout) { // Number of inserts