Commit ceb1430e authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 371475: Quicksearch should include OS field (in addition to Platform field)…

Bug 371475: Quicksearch should include OS field (in addition to Platform field) by default - Patch by Teemu Mannermaa <wicked+bz@etlicon.fi> r/a=LpSolit
parent 6fd079ea
...@@ -91,6 +91,7 @@ use constant MAPPINGS => { ...@@ -91,6 +91,7 @@ use constant MAPPINGS => {
# We might want to put this into localconfig or somewhere # We might want to put this into localconfig or somewhere
use constant PLATFORMS => ('pc', 'sun', 'macintosh', 'mac'); use constant PLATFORMS => ('pc', 'sun', 'macintosh', 'mac');
use constant OPSYSTEMS => ('windows', 'win', 'linux');
use constant PRODUCT_EXCEPTIONS => ( use constant PRODUCT_EXCEPTIONS => (
'row', # [Browser] 'row', # [Browser]
# ^^^ # ^^^
...@@ -288,10 +289,13 @@ sub quicksearch { ...@@ -288,10 +289,13 @@ sub quicksearch {
# Having ruled out the special cases, we may now split # Having ruled out the special cases, we may now split
# by comma, which is another legal boolean OR indicator. # by comma, which is another legal boolean OR indicator.
foreach my $word (split(/,/, $or_operand)) { foreach my $word (split(/,/, $or_operand)) {
# Platform # Platform and operating system
if (grep({lc($word) eq $_} PLATFORMS)) { if (grep({lc($word) eq $_} PLATFORMS)
|| grep({lc($word) eq $_} OPSYSTEMS)) {
addChart('rep_platform', 'substring', addChart('rep_platform', 'substring',
$word, $negate); $word, $negate);
addChart('op_sys', 'substring',
$word, $negate);
} }
# Priority # Priority
elsif ($word =~ m/^[pP]([1-5](-[1-5])?)$/) { elsif ($word =~ m/^[pP]([1-5](-[1-5])?)$/) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment