X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=lib%2FQuery.class.php;h=12e423a28a6ef2455e73324ca85d3779b5f40983;hb=2158110429d1927b2a0f8fc3904a7edab0559e90;hp=48a2bb0e805f5ad6910ce90607e0f0c98b72dc2e;hpb=e0568aca4c4fc5f5da72d0fa7fcef3d8499cb14a;p=mirrors%2FSokoMan.git diff --git a/lib/Query.class.php b/lib/Query.class.php index 48a2bb0..12e423a 100755 --- a/lib/Query.class.php +++ b/lib/Query.class.php @@ -28,10 +28,11 @@ class Query { static function build($query=array(),$prefix=false) { $q=''; if(is_array($query)) foreach($query as $key => $val) { + $key=urlencode($key); $pre = !$prefix ? $key : $prefix.'['.$key.']'; $q.=Query::build($val,$pre); } else { - return $prefix.'='.$query.'&'; + return $prefix.'='.urlencode($query).'&'; } return $q; }