[Mapbender-commits] r6909 - trunk/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Sep 6 10:59:22 EDT 2010
Author: verenadiewald
Date: 2010-09-06 14:59:22 +0000 (Mon, 06 Sep 2010)
New Revision: 6909
Modified:
trunk/mapbender/lib/customTreeModel.js
Log:
check if json is string, then eval
Modified: trunk/mapbender/lib/customTreeModel.js
===================================================================
--- trunk/mapbender/lib/customTreeModel.js 2010-09-06 07:39:49 UTC (rev 6908)
+++ trunk/mapbender/lib/customTreeModel.js 2010-09-06 14:59:22 UTC (rev 6909)
@@ -298,7 +298,8 @@
$.post("../php/mod_customTree_server.php", {
queryObj:$.toJSON(queryObj)
}, function (json, status) {
- var replyObj = eval('(' + json + ')');
+ var replyObj = typeof json == "string" ?
+ eval('(' + json + ')') : json;
var wmsIdArray = findAllWmsInTree();
for (var index in replyObj.data.wmsArray) {
@@ -380,7 +381,8 @@
$.post("../php/mod_customTree_server.php", {
queryObj:$.toJSON(queryObj)
}, function (json, status) {
- var replyObj = eval('(' + json + ')');
+ var replyObj = typeof json == "string" ?
+ eval('(' + json + ')') : json;
that.root.name = "(" + applicationName + ")";
More information about the Mapbender_commits
mailing list