[Mapbender-commits] r2523 -
branches/beck_dev/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jun 20 11:37:47 EDT 2008
Author: christoph
Date: 2008-06-20 11:37:47 -0400 (Fri, 20 Jun 2008)
New Revision: 2523
Modified:
branches/beck_dev/mapbender/http/javascripts/map.php
Log:
allow to load multiple javascripts
Modified: branches/beck_dev/mapbender/http/javascripts/map.php
===================================================================
--- branches/beck_dev/mapbender/http/javascripts/map.php 2008-06-20 15:29:57 UTC (rev 2522)
+++ branches/beck_dev/mapbender/http/javascripts/map.php 2008-06-20 15:37:47 UTC (rev 2523)
@@ -130,17 +130,20 @@
$mb_res = db_prep_query($mb_sql, $mb_v, $mb_t);
while($row_js = db_fetch_array($mb_res)){
if($row_js["e_js_file"] != ""){
- $e_id = $row_js["e_id"];
- $e_src = $row_js["e_src"];
- $e_require = $row_js["e_requires"];
- $e_target = explode(",",$row_js["e_target"]);
- $currentFile = $row_js["e_js_file"];
- if (file_exists($currentFile)) {
- require_once($currentFile);
+ $jsArray = explode(",", $row_js["e_js_file"]);
+ for ($i = 0; $i < count($jsArray); $i++) {
+ $e_id = $row_js["e_id"];
+ $e_src = $row_js["e_src"];
+ $e_require = $row_js["e_requires"];
+ $e_target = explode(",",$row_js["e_target"]);
+ $currentFile = trim($jsArray[$i]);
+ if (file_exists($currentFile)) {
+ require_once($currentFile);
+ }
+ else {
+ $e = new mb_exception("Javascript not found: " . $currentFile);
+ }
}
- else {
- $e = new mb_exception("Javascript not found: " . $currentFile);
- }
}
}
?>
\ No newline at end of file
More information about the Mapbender_commits
mailing list