summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Releases.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-05-24 09:07:52 +0200
committerYorhel <git@yorhel.nl>2009-05-24 09:07:52 +0200
commitdcec270729b0a4a9bfc35b73744a0383a2036728 (patch)
tree11b3564b8dd844e2e8694921d43c190ef00317eb /lib/VNDB/DB/Releases.pm
parent8844486e8eb350185d76cde64105e85251c08040 (diff)
Don't perform search subquery when there are no keywords to search on
Diffstat (limited to 'lib/VNDB/DB/Releases.pm')
-rw-r--r--lib/VNDB/DB/Releases.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Releases.pm b/lib/VNDB/DB/Releases.pm
index bc64b880..9491d213 100644
--- a/lib/VNDB/DB/Releases.pm
+++ b/lib/VNDB/DB/Releases.pm
@@ -51,7 +51,7 @@ sub dbReleaseGet {
s/%//g;
if(/^\d+$/ && gtintype($_)) {
push @where, 'rr.gtin = ?', $_;
- } else {
+ } elsif(length($_) > 0) {
$_ = "%$_%";
push @where, '(rr.title ILIKE ? OR rr.original ILIKE ? OR rr.catalog = ?)',
[ $_, $_, $_ ];