summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-01-16 11:20:07 +0100
committerYorhel <git@yorhel.nl>2021-01-16 11:20:09 +0100
commita8fb32f31c1b843f6dc65f3ff48cd5ddb52b177c (patch)
tree848502a6dc07165a0768fc19d431c6a5c48b27b4 /lib
parent0e6c09a3da8f41a76b9af611a5ba56059e8c4d73 (diff)
AdvSearch: Fix another issue with not enough brackets in SQL branches
I was under the impression that my sql_and() and sql_or() functions already created atomic statements, but they never did.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/AdvSearch.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/AdvSearch.pm b/lib/VNWeb/AdvSearch.pm
index 4e669cdf..18eb5891 100644
--- a/lib/VNWeb/AdvSearch.pm
+++ b/lib/VNWeb/AdvSearch.pm
@@ -654,7 +654,7 @@ sub _sql_where {
}
}
- return $q->[0] eq 'and' ? sql_and @l : sql_or @l;
+ return sql '(', ($q->[0] eq 'and' ? sql_and @l : sql_or @l), ')';
}
my $f = $FIELDS{$t}{$q->[0]};