default => 'before_comments' },
# 2008-08-27 LpSolit@gmail.com -- Bug 182238
timezone => { subclass => 'Timezone', default => 'local' },
+ # 2011-02-07 dkl@mozilla.com -- Bug 580490
+ quicksearch_fulltext => { options => ['on', 'off'], default => 'on' },
}
};
);
# Quicksearch-wide globals for boolean charts.
-our ($chart, $and, $or);
+our ($chart, $and, $or, $fulltext);
sub quicksearch {
my ($searchstring) = (@_);
$searchstring =~ s/(^[\s,]+|[\s,]+$)//g;
ThrowUserError('buglist_parameters_required') unless ($searchstring);
+ $fulltext = Bugzilla->user->settings->{'quicksearch_fulltext'}->{'value'} eq 'on' ? 1 : 0;
+
if ($searchstring =~ m/^[0-9,\s]*$/) {
_bug_numbers_only($searchstring);
}
if ($firstChar eq '#') {
addChart('short_desc', 'substring', $baseWord, $negate);
- addChart('content', 'matches', _matches_phrase($baseWord), $negate);
+ addChart('content', 'matches', _matches_phrase($baseWord), $negate) if $fulltext;
return 1;
}
if ($firstChar eq ':') {
addChart('alias', 'substring', $word, $negate);
addChart('short_desc', 'substring', $word, $negate);
addChart('status_whiteboard', 'substring', $word, $negate);
- addChart('content', 'matches', _matches_phrase($word), $negate);
+ addChart('content', 'matches', _matches_phrase($word), $negate) if $fulltext;
}
sub _handle_urls {