diff options
| author | 2024-08-01 19:44:58 +0200 | |
|---|---|---|
| committer | 2024-08-01 19:44:58 +0200 | |
| commit | 58de38bd737d2dba617944b54a98d4bdb5810588 (patch) | |
| tree | ff197baaabd4b3e12b29eb74f3d818d8f4a04e9a /app/Models/EntryDAO.php | |
| parent | 666e7b27ce4f9c8254e76373572f220ddfb2fd37 (diff) | |
Fix parentheses for complex `OR` boolean search expressions (#6672)
* Fix OR parentheses
* Pass all tests
* Forgotten comment
* Minor whitespace
* Fix several cases envolving negation
* Line length
* Fix `OR NOT`
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index ec627dda1..ba0cf1970 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -762,7 +762,7 @@ SQL; if ($filterSearch !== '') { if ($search !== '') { $search .= $filter->operator(); - } elseif ($filter->operator() === 'AND NOT') { + } elseif (in_array($filter->operator(), ['AND NOT', 'OR NOT'], true)) { // Special case if we start with a negation (there is already the default AND before) $search .= ' NOT'; } |
