aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index d69702c60..02552affe 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -770,6 +770,9 @@ SQL;
if ($filterSearch !== '') {
if ($search !== '') {
$search .= $filter->operator();
+ } elseif ($filter->operator() === 'AND NOT') {
+ // Special case if we start with a negation (there is already the default AND before)
+ $search .= ' NOT';
}
$search .= ' (' . $filterSearch . ') ';
$values = array_merge($values, $filterValues);