[Mapbender-commits] r1249 - trunk/mapbender/http/extensions
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 28 04:53:09 EDT 2007
Author: christoph
Date: 2007-03-28 04:53:09 -0400 (Wed, 28 Mar 2007)
New Revision: 1249
Modified:
trunk/mapbender/http/extensions/geom2wfst.php
Log:
added json headers
added geoserver reply to json
Modified: trunk/mapbender/http/extensions/geom2wfst.php
===================================================================
--- trunk/mapbender/http/extensions/geom2wfst.php 2007-03-28 08:52:05 UTC (rev 1248)
+++ trunk/mapbender/http/extensions/geom2wfst.php 2007-03-28 08:53:09 UTC (rev 1249)
@@ -104,8 +104,7 @@
$e = new mb_exception('WFS-T: '.$filter);
-
-header('Content-type: text/html');
+header('Content-type: application/json');
echo "{";
if (stristr($data, "success") !== false) {
$response = "success";
@@ -113,9 +112,11 @@
$fid = ereg_replace("^.*ogc:FeatureId fid=\"(.+)\"/>.*$", "\\1", $data);
echo "\"fid\":\"".$fid."\",";
}
+ echo "\"success confirmation\":\"".str_replace("\"", "'", str_replace("\n", "", str_replace("\r", "", $data)))."\",";
}
else {
$response = "error";
+ echo "\"error message\":\"".addslashes($data)."\",";
}
echo "\"response\":\"".$response."\"}";
?>
\ No newline at end of file
More information about the Mapbender_commits
mailing list