summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-05-24 18:49:00 +0200
committerYorhel <git@yorhel.nl>2018-05-24 18:49:04 +0200
commit8802eac4f345f5a1d4fe8cf8e0b5ada3d9bc857e (patch)
treebbf8cf51c04e56a585784367648acd839e89c80a /lib/VNDB
parent700518267f536be9086f46e4921383df25b264cf (diff)
DB::Chars: Ignore spaces when matching original names
https://vndb.org/t950.432
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/DB/Chars.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Chars.pm b/lib/VNDB/DB/Chars.pm
index db9ae93b..167ee223 100644
--- a/lib/VNDB/DB/Chars.pm
+++ b/lib/VNDB/DB/Chars.pm
@@ -42,7 +42,7 @@ sub dbCharGet {
defined $o{weight_min} ? ( 'c.weight >= ?' => $o{weight_min} ) : (),
defined $o{weight_max} ? ( 'c.weight <= ? AND c.weight > 0' => $o{weight_max} ) : (),
$o{search} ? (
- '(c.name ILIKE ? OR c.original ILIKE ? OR c.alias ILIKE ?)', [ map '%'.$o{search}.'%', 1..3 ] ) : (),
+ "(c.name ILIKE ? OR translate(c.original,' ','') ILIKE translate(?,' ','')) OR c.alias ILIKE ?", [ map '%'.$o{search}.'%', 1..3 ] ) : (),
$o{char} ? (
'LOWER(SUBSTR(c.name, 1, 1)) = ?' => $o{char} ) : (),
defined $o{char} && !$o{char} ? (