[Mapbender-commits] r6918 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Sep 15 10:59:57 EDT 2010


Author: armin11
Date: 2010-09-15 14:59:57 +0000 (Wed, 15 Sep 2010)
New Revision: 6918

Modified:
   trunk/mapbender/http/javascripts/map.php
Log:
Bugfixing of sql - no language parameter was defined?

Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php	2010-09-15 09:24:08 UTC (rev 6917)
+++ trunk/mapbender/http/javascripts/map.php	2010-09-15 14:59:57 UTC (rev 6918)
@@ -158,13 +158,14 @@
 <?php
 $executeJsPluginsArray = array();
 $linkJsPluginsArray = array();
-
+//get language code
+$langCode = Mapbender::session()->get("mb_lang");
 $mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos, e_url, " . 
-	"e_left, e_top, e_title, gettext($1, e_title) AS e_current_title, " . 
+	"e_left, e_top, e_title, gettext($2, e_title) AS e_current_title, " . 
 	"e_width, e_height, e_requires FROM gui_element WHERE e_public = 1 AND " .
 	"fkey_gui_id = $1 ORDER BY e_pos";
-$mb_v = array($gui_id);
-$mb_t = array("s");
+$mb_v = array($gui_id, $langCode);
+$mb_t = array("s","s");
 $mb_res = db_prep_query($mb_sql, $mb_v, $mb_t);
 while ($row_js = db_fetch_array($mb_res)) {
 



More information about the Mapbender_commits mailing list