[Mapbender-commits] r4216 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jun 25 07:09:07 EDT 2009
Author: vera
Date: 2009-06-25 07:09:07 -0400 (Thu, 25 Jun 2009)
New Revision: 4216
Modified:
trunk/mapbender/http/javascripts/mod_switchLocale_noreload.php
Log:
session var angepasst
Modified: trunk/mapbender/http/javascripts/mod_switchLocale_noreload.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_switchLocale_noreload.php 2009-06-25 11:07:27 UTC (rev 4215)
+++ trunk/mapbender/http/javascripts/mod_switchLocale_noreload.php 2009-06-25 11:09:07 UTC (rev 4216)
@@ -1,54 +1,54 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/localeSwitch
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../classes/class_locale.php");
-
-include(dirname(__FILE__) . "/../include/dyn_js.php");
-
-if (!USE_I18N) {
- echo "var languages = '" . $_SESSION["mb_lang"] . "';";
-}
-?>
-
-function validate_locale(){
- var index = document.getElementById("language").selectedIndex;
- var lang = document.getElementById("language").options[index].value;
- mb_ajax_post("../php/mod_setLocale.php", {"lang":lang}, function(result, status) {
- Mapbender.locale = result;
- eventLocalize.trigger();
- });
-}
-
-eventInit.register(function () {
- var localeSelectNode = document.getElementById('language');
- var languageArray = languages.split(",");
- var selected = false;
- for (var i = 0; i < languageArray.length; i++) {
- if (languageArray[i] == '<?php echo $_SESSION["mb_lang"];?>') {
- selected = true;
- }
- else {
- selected = false;
- }
-
- var currentOption = new Option(languageArray[i], languageArray[i], selected, selected);
- localeSelectNode.options[i] = currentOption;
- }
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/localeSwitch
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_locale.php");
+
+include(dirname(__FILE__) . "/../include/dyn_js.php");
+
+if (!USE_I18N) {
+ echo "var languages = '" . Mapbender::session()->get("mb_lang") . "';";
+}
+?>
+
+function validate_locale(){
+ var index = document.getElementById("language").selectedIndex;
+ var lang = document.getElementById("language").options[index].value;
+ mb_ajax_post("../php/mod_setLocale.php", {"lang":lang}, function(result, status) {
+ Mapbender.locale = result;
+ eventLocalize.trigger();
+ });
+}
+
+eventInit.register(function () {
+ var localeSelectNode = document.getElementById('language');
+ var languageArray = languages.split(",");
+ var selected = false;
+ for (var i = 0; i < languageArray.length; i++) {
+ if (languageArray[i] == '<?php echo Mapbender::session()->get("mb_lang");?>') {
+ selected = true;
+ }
+ else {
+ selected = false;
+ }
+
+ var currentOption = new Option(languageArray[i], languageArray[i], selected, selected);
+ localeSelectNode.options[i] = currentOption;
+ }
});
\ No newline at end of file
More information about the Mapbender_commits
mailing list