[fusion-commits] r1979 - trunk/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Nov 17 11:12:34 EST 2009


Author: pagameba
Date: 2009-11-17 11:12:34 -0500 (Tue, 17 Nov 2009)
New Revision: 1979

Modified:
   trunk/lib/fusion.js
Log:
re #300, createSessionId is being called regardless of whether we actually need to call it or not.  Moving call to inside test for appDefUrl being set and adding extra conditions to make sure the appDefUrl is being requested from a mapguide repository before actually invoking the call to createSessionId (which is mapguide specific and causes a javascript error for mapserver users).

Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js	2009-11-17 06:22:02 UTC (rev 1978)
+++ trunk/lib/fusion.js	2009-11-17 16:12:34 UTC (rev 1979)
@@ -1213,9 +1213,11 @@
 		Fusion.sessionId = o.sessionId;
 	}
 	
-	createSessionId();	
 	var appDefUrl = Fusion.getQueryParam('ApplicationDefinition'); 
-	if(appDefUrl){
+	if(appDefUrl && (
+	    appDefUrl.indexOf('Library') == 0 ||
+	    appDefUrl.indexOf('Session') == 0)){
+    	createSessionId();	
 		var xhr = new getXmlHttpRequest(); 
 		var mapAgentUrl = getAgentUrl(); 
 		xhr.open("GET", mapAgentUrl + "?OPERATION=GETRESOURCECONTENT&VERSION=1.0.0&LOCALE=en&CLIENTAGENT=MapGuide+Developer&RESOURCEID=" + appDefUrl + "&FORMAT=text%2Fxml&SESSION="+ Fusion.sessionId, false); 



More information about the fusion-commits mailing list