dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c700da
)
Add array support to wfArrayToCGI(): when receiving parameters in the form of &foo...
author
Roan Kattouw
<catrope@users.mediawiki.org>
Sat, 24 May 2008 21:54:57 +0000
(21:54 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Sat, 24 May 2008 21:54:57 +0000
(21:54 +0000)
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
a9bf015
..
3294c8f
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-999,7
+999,13
@@
function wfArrayToCGI( $array1, $array2 = NULL )
if ( '' != $cgi ) {
$cgi .= '&';
}
- $cgi .= urlencode( $key ) . '=' . urlencode( $value );
+ if(is_array($value))
+ foreach($value as $v)
+ $cgi .= urlencode( $key . '[]' ) . '=' .
+ urlencode( $v );
+ else
+ $cgi .= urlencode( $key ) . '=' .
+ urlencode( $value );
}
}
return $cgi;