fix: [event index] org filter correctly accepts array in addition to pipe delimited values

- fixes pull org filters
pull/5746/head
iglocska 2020-03-30 08:56:30 +02:00
parent 83328f4e4c
commit f028313029
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 5 additions and 1 deletions

View File

@ -415,7 +415,11 @@ class EventsController extends AppController
$orgUuidArray = $this->Event->Org->find('list', array('fields' => array('Org.uuid')));
$orgArray = array_map('strtoupper', $orgArray);
// if the first character is '!', search for NOT LIKE the rest of the string (excluding the '!' itself of course)
$pieces = explode('|', $v);
if (!is_array($v)) {
$pieces = explode('|', $v);
} else {
$pieces = $v;
}
$test = array();
foreach ($pieces as $piece) {
if ($piece[0] == '!') {