fix: Fixed an issue where url parameters for restsearch didn't block attributes

- url parameters are bad
- shame
- SHAME
pull/2739/head
iglocska 2017-12-13 19:22:27 +01:00
parent ceec98eb15
commit 92b441f37a
1 changed files with 4 additions and 1 deletions

View File

@ -2798,7 +2798,10 @@ class EventsController extends AppController {
// If we sent any tags along, load the associated tag names for each attribute
if ($tags) $conditions = $this->Event->Attribute->setTagConditions($tags, $conditions);
$blockedAttributeTags = array();
if ($tags) {
if (!empty($tags)) {
if (!is_array($tags)) {
$tags = explode('&&', $tags);
}
foreach ($tags as $tag) {
if ($tag[0] == '!') {
$blockedAttributeTags[] = ltrim($tag, '!');