diff options
author | Yorhel <git@yorhel.nl> | 2009-05-24 09:07:52 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-05-24 09:07:52 +0200 |
commit | dcec270729b0a4a9bfc35b73744a0383a2036728 (patch) | |
tree | 11b3564b8dd844e2e8694921d43c190ef00317eb /lib/VNDB/DB/Releases.pm | |
parent | 8844486e8eb350185d76cde64105e85251c08040 (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.pm | 2 |
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 = ?)', [ $_, $_, $_ ]; |