summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-09 16:46:00 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-09 16:46:00 +0000
commitf8b467a1a6cff156a55770642e34a1d5c0142079 (patch)
tree9d2e830370511d247125938866071535709e7a93
parent9c45fc9e59c76e9976afafaaa09d154d2d24894b (diff)
Made the GTIN field searchable (Im starting to get used to this commiting more often ^-^)
git-svn-id: svn://vndb.org/vndb@27 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
-rw-r--r--lib/VNDB/Util/DB.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/Util/DB.pm b/lib/VNDB/Util/DB.pm
index b1372a54..82b51f05 100644
--- a/lib/VNDB/Util/DB.pm
+++ b/lib/VNDB/Util/DB.pm
@@ -590,7 +590,8 @@ sub DBGetVN { # %options->{ id rev char search order results page what cati cate
for (split /[ -,]/, $o{search}) {
s/%//g;
next if length($_) < 2;
- $w{ sprintf '(ivr.title ILIKE %s OR ivr.alias ILIKE %1$s OR irr.title ILIKE %1$s OR irr.original ILIKE %1$s)',
+ my $gt = VNDB::GTINType($_) ? ' OR irr.gtin = '.$_ : '';
+ $w{ sprintf '(ivr.title ILIKE %s OR ivr.alias ILIKE %1$s OR irr.title ILIKE %1$s OR irr.original ILIKE %1$s'.$gt.')',
qs('%%'.$_.'%%') } = 1;
}
$where{ q|