forked from lino/radar-wp
Bump 2.0.6 - did these only get committed to SVN and not git?
This commit is contained in:
parent
c57a3a776a
commit
3ff30b8fb7
5 changed files with 46 additions and 21 deletions
|
@ -59,7 +59,7 @@ class Squat_Radar_Connector {
|
|||
$result = [];
|
||||
// Urldecode not required here because of the regex match.
|
||||
// Radar paramaters here are transcoded so will match.
|
||||
if (preg_match('|//radar.squat.net/([a-z]{2})/events/([a-zA-Z0-9/]*)|', $url, $matches)) {
|
||||
if (preg_match('|//radar.squat.net/([a-z]{2})/events/([a-zA-Z0-9\-/]*)|', $url, $matches)) {
|
||||
$result['language'] = $matches[1];
|
||||
foreach (array_chunk(explode('/', $matches[2]), 2) as $key_value_pair) {
|
||||
$result['facets'][$key_value_pair[0]] = $key_value_pair[1];
|
||||
|
@ -90,7 +90,7 @@ class Squat_Radar_Connector {
|
|||
// Urlencode should do nothing here @see comment in decode_search_url.
|
||||
// If someone has snuck something in it will however help.
|
||||
foreach ( $facets as $key => $value ) {
|
||||
$query[] = ['facets[' . urlencode($key) . '][]' => urlencode($value)];
|
||||
$query['facets[' . urlencode($key) . ']'][] = urlencode($value);
|
||||
}
|
||||
if ( ! empty($fields) ) {
|
||||
// {raw}urlencode is encoding : and , both of which are valid pchar.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue