mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 11:44:42 +02:00
Add PR #231 simpler arrayToCSV builder in MarkupPagerNav
This commit is contained in:
@@ -540,13 +540,9 @@ class MarkupPagerNav extends Wire implements Module {
|
|||||||
foreach($this->options['getVars'] as $key => $value) {
|
foreach($this->options['getVars'] as $key => $value) {
|
||||||
if(is_array($value)) {
|
if(is_array($value)) {
|
||||||
if($this->options['arrayToCSV']) {
|
if($this->options['arrayToCSV']) {
|
||||||
$a = $value;
|
$queryString .= "$key=" . urlencode(implode(",", $value)) . "&";
|
||||||
$value = '';
|
|
||||||
foreach($a as $k => $v) $value .= "$v,";
|
|
||||||
$value = rtrim($value, ", ");
|
|
||||||
$queryString .= "$key=" . urlencode($value) . "&";
|
|
||||||
} else {
|
} else {
|
||||||
foreach($value as $k => $v) $queryString .= "$key%5B%5D=" . urlencode($v) . "&";
|
foreach($value as $v) $queryString .= "$key%5B%5D=" . urlencode($v) . "&";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user