diff --git a/pandora_console/include/functions_maps.php b/pandora_console/include/functions_maps.php index 26fa02515b..7d9a5992f8 100644 --- a/pandora_console/include/functions_maps.php +++ b/pandora_console/include/functions_maps.php @@ -91,16 +91,22 @@ function maps_duplicate_items_map($id, $map_items) { if ($result_copy_item) { $item_relations = db_get_all_rows_sql("SELECT * FROM trel_item WHERE id = " . $item['id']); if ($item['id'] == $item_relations['parent_id']) { - $copy_item_relations = array('id_parent' => $result_copy_item, - 'id_child' => $item_relations['id_child'], 'parent_type' => $item_relations['parent_type'], - 'child_type' => $item_relations['child_type'], 'id_item' => $item_relations['id_item'] - 'deleted' => $item_relations['deleted']); + $copy_item_relations = array( + 'id_parent' => $result_copy_item, + 'id_child' => $item_relations['id_child'], + 'parent_type' => $item_relations['parent_type'], + 'child_type' => $item_relations['child_type'], + 'id_item' => $item_relations['id_item'], + 'deleted' => $item_relations['deleted']); } else { - $copy_item_relations = array('id_parent' => $item_relations['id_parent'], - 'id_child' => $result_copy_item, 'parent_type' => $item_relations['parent_type'], - 'child_type' => $item_relations['child_type'], 'id_item' => $item_relations['id_item'] - 'deleted' => $item_relations['deleted']); + $copy_item_relations = array( + 'id_parent' => $item_relations['id_parent'], + 'id_child' => $result_copy_item, + 'parent_type' => $item_relations['parent_type'], + 'child_type' => $item_relations['child_type'], + 'id_item' => $item_relations['id_item'], + 'deleted' => $item_relations['deleted']); } db_process_sql_insert('trel_item', $copy_item_relations); } @@ -155,10 +161,31 @@ function maps_show($id) { if (maps_is_networkmap($id)) { require_once("include/functions_networkmaps.php"); - networkmaps_show($id); + $map = new Networkmap($id); + $map->show(); } else { //TODO VISUAL } } + +class Map { + protected $id = null; + + public function __construct($id) { + $this->id = $id; + } + + public function show() { + ?> +