1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 03:05:26 +02:00

Add PR #231 simpler arrayToCSV builder in MarkupPagerNav

This commit is contained in:
pine3ree
2023-01-19 11:13:08 -05:00
committed by Ryan Cramer
parent 5fb52e9d1c
commit a5869294fb

View File

@@ -540,13 +540,9 @@ class MarkupPagerNav extends Wire implements Module {
foreach($this->options['getVars'] as $key => $value) {
if(is_array($value)) {
if($this->options['arrayToCSV']) {
$a = $value;
$value = '';
foreach($a as $k => $v) $value .= "$v,";
$value = rtrim($value, ", ");
$queryString .= "$key=" . urlencode($value) . "&";
$queryString .= "$key=" . urlencode(implode(",", $value)) . "&";
} else {
foreach($value as $k => $v) $queryString .= "$key%5B%5D=" . urlencode($v) . "&";
foreach($value as $v) $queryString .= "$key%5B%5D=" . urlencode($v) . "&";
}
} else {