From c3afdbbdb6d2edc7d89189c5ac4fdbde5b4232ef Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Wed, 12 Nov 2008 20:23:48 +0000 Subject: [PATCH] =?UTF-8?q?Tenir=20compte=20des=20param=C3=A8tres=20tablea?= =?UTF-8?q?ux=20dans=20parametre=5Furl=20(Relaet).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc/utils.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index cc29381889..cc6b777474 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -286,7 +286,14 @@ function parametre_url($url, $c, $v=NULL, $sep='&') { AND count($args)==2) return $v; elseif ($v) { - foreach($ajouts as $k => $n) $url[] = $k .'=' . $u; + foreach($ajouts as $k => $n) { + if (!is_array($v)) + $url[] = $k .'=' . $u; + else { + $id = (substr($k,-2) != '[]') ? $k : ($k ."[]"); + foreach ($v as $w) $url[]= $id .'=' . $w; + } + } } // eliminer les vides -- GitLab