summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-01-16 11:20:39 +0100
committerYorhel <git@yorhel.nl>2009-01-16 11:20:39 +0100
commit910bb9f397cec1a49526e09e7d2c9b856bd5bdae (patch)
treee3c1f80e829404ea4edf4d98faf90b7fdf18a107
parent14b629b90276058db4478f1c6348dbaa71b55937 (diff)
Let VN search match on vn->original, and regard . and _ as spaces
-rw-r--r--ChangeLog1
-rw-r--r--lib/VNDB/DB/VN.pm6
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e28f6cbd..28d23ccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
- VN search doesn't match on titles of older release revisions anymore
- Don't forget to update the vn.c_* columns when hiding/unhiding a release
- Fixed month display on VNBrowse
+ - VN search also matches on original title field of the vn entry
2.1 - 2008-12-29
- Skin support
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index dc386286..368657fc 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -53,15 +53,15 @@ sub dbVNGet {
my @w = (
'(irr.id IS NULL OR ir.latest = irr.id)' => 1
);
- for (split /[ -,]/, $o{search}) {
+ for (split /[ -,._]/, $o{search}) {
s/%//g;
next if length($_) < 2;
if(/^\d+$/ && gtintype($_)) {
push @w, 'irr.gtin = ?', $_;
} else {
$_ = "%$_%";
- push @w, '(ivr.title ILIKE ? OR ivr.alias ILIKE ? OR irr.title ILIKE ? OR irr.original ILIKE ?)',
- [ $_, $_, $_, $_ ];
+ push @w, '(ivr.title ILIKE ? OR ivr.original ILIKE ? OR ivr.alias ILIKE ? OR irr.title ILIKE ? OR irr.original ILIKE ?)',
+ [ $_, $_, $_, $_, $_ ];
}
}
$where{ q|