Opened 16 years ago

Closed 16 years ago

#134 closed defect (fixed)

the same javascript may be loaded twice in map.php

Reported by: christoph Owned by: mapbender_dev@…
Priority: major Milestone: 2.5 release
Component: core Version: 2.4.3
Keywords: Cc:

Description

map.php

$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ORDER BY e_pos"; $mb_v = array($_REQUESTgui_id); $mb_t = array("s"); $mb_res = db_prep_query($mb_sql, $mb_v, $mb_t); while($row_js = db_fetch_array($mb_res)){

if($row_jse_js_file != ""){

$e_id = $row_jse_id; $e_id_css = $row_jse_id; $e_src = $row_jse_src; $e_target = $row_jse_target; include($row_jse_js_file);

}

}

Maybe we could just replace the include by include_once?

If we wanted to enable loading the same element multiple times, we would really need to change the architecture...

Change History (1)

comment:1 by christoph, 16 years ago

Resolution: fixed
Status: newclosed

is fixed in trunk. No patch.

Note: See TracTickets for help on using tickets.