[Mapbender-commits] r2118 - in branches/2.5: conf http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 20 06:16:45 EST 2008


Author: christoph
Date: 2008-02-20 06:16:45 -0500 (Wed, 20 Feb 2008)
New Revision: 2118

Modified:
   branches/2.5/conf/session.conf
   branches/2.5/http/javascripts/mod_initWmc.php
Log:
init wmc is now able to either load, merge or append

Modified: branches/2.5/conf/session.conf
===================================================================
--- branches/2.5/conf/session.conf	2008-02-20 11:13:59 UTC (rev 2117)
+++ branches/2.5/conf/session.conf	2008-02-20 11:16:45 UTC (rev 2118)
@@ -4,9 +4,22 @@
 $_SESSION["mb_user_name"] = $name;
 $_SESSION["mb_user_ip"] =  $_SERVER['REMOTE_ADDR'];
 $_SESSION["mb_myBBOX"] = $_REQUEST["mb_myBBOX"];
-$_SESSION["mb_myWmc"] = $_REQUEST["wmc_id"];
 $_SESSION["mb_myKml"] = $_REQUEST["kml_id"];
 $_SESSION["mb_myPOI"] = $_REQUEST["mb_myPOI"];
 $_SESSION["mb_myPOI2SCALE"] = $_REQUEST["mb_myPOI2SCALE"];
-$_SESSION["mb_lang"] = $_REQUEST["mb_lang"];
+
+$_SESSION["mb_myWmc"] = "";
+$_SESSION["mb_myWmc_action"] = "";
+if ($_REQUEST["wmc_id"]) {
+	$_SESSION["mb_myWmc"] = $_REQUEST["wmc_id"];
+	$_SESSION["mb_myWmc_action"] = "load";
+}
+else if ($_REQUEST["merge_wmc_id"]) {
+	$_SESSION["mb_myWmc"] = $_REQUEST["merge_wmc_id"];
+	$_SESSION["mb_myWmc_action"] = "merge";
+}
+else if ($_REQUEST["append_wmc_id"]) {
+	$_SESSION["mb_myWmc"] = $_REQUEST["append_wmc_id"];
+	$_SESSION["mb_myWmc_action"] = "append";
+}
 ?>
\ No newline at end of file

Modified: branches/2.5/http/javascripts/mod_initWmc.php
===================================================================
--- branches/2.5/http/javascripts/mod_initWmc.php	2008-02-20 11:13:59 UTC (rev 2117)
+++ branches/2.5/http/javascripts/mod_initWmc.php	2008-02-20 11:16:45 UTC (rev 2118)
@@ -1,6 +1,9 @@
 <?php
 session_start();
-$wmc_id = $_SESSION['mb_myWmc'];
+if ($_SESSION['mb_myWmc'] && $_SESSION['mb_myWmc_action'] && in_array($_SESSION['mb_myWmc_action'], array("load", "merge", "append"))) {
+	$action = $_SESSION['mb_myWmc_action'];
+	$wmc_id = $_SESSION['mb_myWmc'];
+}
 $user = $_SESSION['mb_user_id'];
 $meetingPointId = $_SESSION['mb_myKml'];
 
@@ -81,7 +84,7 @@
 			echo "wmc_id = '".$wmc_id."';";
 			$wmc = new wmc();
 			$wmc->createObjFromWMC_id($wmc_id);
-			$js_wmc .= $wmc->createJsObjFromWMC("", $e_target[0], "load");
+			$js_wmc .= $wmc->createJsObjFromWMC("", $e_target[0], $action);
 			
 			if (!empty($x) && !empty($y) && !empty($icon)) {
 				



More information about the Mapbender_commits mailing list