svn commit: r823 - trunk/mapbender/http/include/dyn_js.php

christoph at osgeo.org christoph at osgeo.org
Mon Nov 20 03:17:49 EST 2006


Author: christoph
Date: 2006-11-20 08:17:49+0000
New Revision: 823

Modified:
   trunk/mapbender/http/include/dyn_js.php

Log:
js variables with numeric values are echoed without single quotes

Modified: trunk/mapbender/http/include/dyn_js.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/include/dyn_js.php?view=diff&rev=823&p1=trunk/mapbender/http/include/dyn_js.php&p2=trunk/mapbender/http/include/dyn_js.php&r1=822&r2=823
==============================================================================
--- trunk/mapbender/http/include/dyn_js.php	(original)
+++ trunk/mapbender/http/include/dyn_js.php	2006-11-20 08:17:49+0000
@@ -39,7 +39,12 @@
 		else {
 			echo "var ";
 		}
-		echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
+		if (is_numeric(stripslashes($row["var_value"]))) {
+			echo $row["var_name"]." = ".stripslashes($row["var_value"]).";\n";
+		}
+		else {
+			echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
+		}
 	}
 }
 ?>
\ No newline at end of file




More information about the Mapbender_commits mailing list