[Mapbender-commits] r1437 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jun 5 06:13:16 EDT 2007


Author: christoph
Date: 2007-06-05 06:13:16 -0400 (Tue, 05 Jun 2007)
New Revision: 1437

Modified:
   trunk/mapbender/http/javascripts/mod_displayWmc.php
Log:
switch: short open tags on/off

This setting is necessary because otherwise the XML
(beginning with "<?xml") will be interpreted as php!



Modified: trunk/mapbender/http/javascripts/mod_displayWmc.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_displayWmc.php	2007-06-05 10:05:57 UTC (rev 1436)
+++ trunk/mapbender/http/javascripts/mod_displayWmc.php	2007-06-05 10:13:16 UTC (rev 1437)
@@ -29,8 +29,15 @@
 		if ($wmc_gml){
 			//Display WMC
  
-			//header("Content-type: application/xhtml+xml; charset=".CHARSET);
-			echo htmlentities($wmc_gml);
+ 			// if "short open tags" is activated, the xml output is interpreted
+ 			// as php, because the XML begins with "<?xml "
+ 			if (ini_get("short_open_tag") == 1) {
+				echo htmlentities($wmc_gml);
+ 			}
+ 			else {
+				header("Content-type: application/xhtml+xml; charset=".CHARSET);
+				echo htmlentities($wmc_gml);
+ 			}
 		}
 		else{
 			echo "Invalid document!";



More information about the Mapbender_commits mailing list