diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index 39096564fe..b91c032ec3 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -511,6 +511,12 @@ function gis_get_map_conf($idMap) { return $mapConfs; } +function get_good_con() { + $sql = 'SELECT * FROM tgis_map_connection WHERE id_tmap_connection = 2'; + + return db_get_all_rows_sql($sql); +} + function gis_get_map_connection($idMapConnection) { return db_get_row('tgis_map_connection', 'id_tmap_connection', $idMapConnection); } diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index 7b6f236542..cb3b7f0ad7 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -29,6 +29,15 @@ $show_history = get_parameter ('show_history', 'n'); $map = db_get_row ('tgis_map', 'id_tgis_map', $idMap); $confMap = gis_get_map_conf($idMap); +/* -------------------------------------------------- */ +/* I apply this change because open maps now are paid */ +/* --------------- Remove to go back ---------------- */ +/* -------------------------------------------------- */ +if ($confMap !== false) { /* ------------------------ */ + $confMap = get_good_con(); /* ------------------- */ +} /* ------------------------------------------------ */ +/* -------------------------------------------------- */ + if (! check_acl ($config['id_user'], $map['group_id'], "MR") && ! check_acl ($config['id_user'], $map['group_id'], "MW") && ! check_acl ($config['id_user'], $map['group_id'], "MM")) { db_pandora_audit("ACL Violation", "Trying to access map builder"); require ("general/noaccess.php");