Browse Source

added force_std_separator config

Nicolas Cannasse 17 years ago
parent
commit
b9545a708b
1 changed files with 10 additions and 0 deletions
  1. 10 0
      std/php/Web.hx

+ 10 - 0
std/php/Web.hx

@@ -10,10 +10,20 @@ class Web {
 		Returns the GET and POST parameters.
 		Returns the GET and POST parameters.
 	**/
 	**/
 	public static function getParams() {
 	public static function getParams() {
+		#if force_std_separator
+		var h = Lib.hashOfAssociativeArray(untyped __php__("$_POST"));
+		for( p in getParamsString().split(";") ) {
+			var a = p.split("=");
+			var n = a.shift();
+			h.set(StringTools.urlDecode(n),StringTools.urlDecode(a.join("=")));
+		}
+		return h;
+		#else
 		var a : Array<String> = untyped __php__("array_merge($_GET, $_POST)");
 		var a : Array<String> = untyped __php__("array_merge($_GET, $_POST)");
 		if(untyped __call__("get_magic_quotes_gpc"))
 		if(untyped __call__("get_magic_quotes_gpc"))
 			untyped __php__("foreach($a as $k => $v) $a[$k] = stripslashes($v)");
 			untyped __php__("foreach($a as $k => $v) $a[$k] = stripslashes($v)");
 		return Lib.hashOfAssociativeArray(a);
 		return Lib.hashOfAssociativeArray(a);
+		#end
 	}
 	}
 
 
 	/**
 	/**