| @@ 231-253 (lines=23) @@ | ||
| 228 | ||
| 229 | if (in_array($fieldName, $this->fields)) { |
|
| 230 | ||
| 231 | if ($filtering->hasOperator()) { |
|
| 232 | if ($filtering->isListOperator()) { |
|
| 233 | $whereCondition = |
|
| 234 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 235 | $op->getMeta() . ' ' . |
|
| 236 | '(:field_' . $fieldName . $saltObj->getSalt() . ')'; |
|
| 237 | } else if ($filtering->isFieldEqualsOperator()) { |
|
| 238 | $whereCondition = |
|
| 239 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 240 | $op->getMeta() . ' ' . |
|
| 241 | $this->entityAlias . '.' . $value; |
|
| 242 | } else { |
|
| 243 | $whereCondition = |
|
| 244 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 245 | $op->getMeta() . ' ' . |
|
| 246 | ':field_' . $fieldName . $saltObj->getSalt(); |
|
| 247 | } |
|
| 248 | } else { |
|
| 249 | $whereCondition = |
|
| 250 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 251 | $op->getMeta() . ' ' . |
|
| 252 | ':field_' . $fieldName . $saltObj->getSalt(); |
|
| 253 | } |
|
| 254 | ||
| 255 | $this->qBuilder->andWhere($whereCondition); |
|
| 256 | ||
| @@ 332-355 (lines=24) @@ | ||
| 329 | ||
| 330 | if (in_array($fieldName, $this->fields)) { |
|
| 331 | ||
| 332 | if ($filtering->hasOperator()) { |
|
| 333 | if ($filtering->isListOperator()) { |
|
| 334 | $whereCondition = |
|
| 335 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 336 | $op->getMeta() |
|
| 337 | .' (:field_' . $fieldName . $saltObj->getSalt() . ')'; |
|
| 338 | } else if ($filtering->isFieldEqualsOperator()) { |
|
| 339 | $whereCondition = |
|
| 340 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 341 | $op->getMeta() . ' ' . |
|
| 342 | $this->entityAlias . '.' . $value |
|
| 343 | ; |
|
| 344 | } else { |
|
| 345 | $whereCondition = |
|
| 346 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 347 | $op->getMeta() . ' ' . |
|
| 348 | ':field_' . $fieldName . $saltObj->getSalt(); |
|
| 349 | } |
|
| 350 | } else { |
|
| 351 | $whereCondition = |
|
| 352 | $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 353 | '=' . ' ' . |
|
| 354 | ':field_' . $fieldName . $saltObj->getSalt(); |
|
| 355 | } |
|
| 356 | ||
| 357 | if ($orCondition['orCondition'] != null) { |
|
| 358 | $orCondition['orCondition'] .= ' OR ' . $whereCondition; |
|