[Mapbender-commits] r6606 - trunk/mapbender/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jul 19 11:18:12 EDT 2010


Author: christoph
Date: 2010-07-19 15:18:12 +0000 (Mon, 19 Jul 2010)
New Revision: 6606

Modified:
   trunk/mapbender/lib/ajax.js
Log:
add session info to url

Modified: trunk/mapbender/lib/ajax.js
===================================================================
--- trunk/mapbender/lib/ajax.js	2010-07-19 12:30:46 UTC (rev 6605)
+++ trunk/mapbender/lib/ajax.js	2010-07-19 15:18:12 UTC (rev 6606)
@@ -68,8 +68,16 @@
  * <deprecated variable name>  - *[deprecated]* <type and description>
  */
 Mapbender.Ajax.Notification = function (options) {
+	var conjunctionCharacter = function (url) {
+		if (url.indexOf("?") === -1) {
+			return "?";
+		}
+		return "&";
+	};
+
 	if (typeof options === "object") {
 		var url = (options.url) ? options.url : "";
+		url += conjunctionCharacter(url) + Mapbender.sessionName + "=" + Mapbender.sessionId;
 		var type = (options.type) ? options.type.toUpperCase() : "POST";
 		var log = (options.log) ? options.log : false;
 		var method = (options.method) ? options.method : "";
@@ -110,6 +118,9 @@
 			"method": method,
 			"params": $.toJSON(parameters),
 			"id": null
+//			,
+//			"sessionName": Mapbender.sessionName,
+//			"sessionId": Mapbender.sessionId
 		};
 	};
 };
@@ -153,8 +164,17 @@
  * 							be executed within the scope of this object
  */
 Mapbender.Ajax.Request = function (options) {
+	var conjunctionCharacter = function (url) {
+		if (url.indexOf("?") === -1) {
+			return "?";
+		}
+		return "&";
+	};
+
 	if (typeof options === "object") {
 		var url = (options.url) ? options.url : "";
+		url += conjunctionCharacter(url) + Mapbender.sessionName + "=" + Mapbender.sessionId;
+
 		var type = (options.type) ? options.type.toUpperCase() : "POST";
 		var log = (options.log) ? options.log : false;
 		var method = (options.method) ? options.method : "";
@@ -311,6 +331,9 @@
 			"method": method,
 			"params": $.toJSON(parameters),
 			"id": id
+//			,
+//			"sessionName": Mapbender.sessionName,
+//			"sessionId": Mapbender.sessionId
 		};
 	};
     return this;



More information about the Mapbender_commits mailing list