summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-07-05 20:43:18 +0200
committerDylan William Hardison <dylan@hardison.net>2017-07-07 00:19:20 +0200
commit37722eca39874bb6abdcd120e3e458bd62dea62b (patch)
tree57a9a9970c00ec77baecab7e154ef7dfcef863fe /Bugzilla/Search
parenta6f98de0d4e842351222b0173a1fff151da8738e (diff)
downloadbugzilla-37722eca39874bb6abdcd120e3e458bd62dea62b.tar.gz
bugzilla-37722eca39874bb6abdcd120e3e458bd62dea62b.tar.xz
Bug 1377933 - Remove trailing whitespace from all perl files
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r--Bugzilla/Search/Clause.pm2
-rw-r--r--Bugzilla/Search/Quicksearch.pm20
-rw-r--r--Bugzilla/Search/Saved.pm12
3 files changed, 17 insertions, 17 deletions
diff --git a/Bugzilla/Search/Clause.pm b/Bugzilla/Search/Clause.pm
index 1c9491012..4426ea576 100644
--- a/Bugzilla/Search/Clause.pm
+++ b/Bugzilla/Search/Clause.pm
@@ -57,7 +57,7 @@ sub add {
push(@$children, condition(@_));
return;
}
-
+
my ($child) = @_;
return if !defined $child;
$child->isa(__PACKAGE__) || $child->isa('Bugzilla::Search::Condition')
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm
index 462a9ba85..b28829c3a 100644
--- a/Bugzilla/Search/Quicksearch.pm
+++ b/Bugzilla/Search/Quicksearch.pm
@@ -69,8 +69,8 @@ sub FIELD_MAP {
return $cache->{quicksearch_fields} if $cache->{quicksearch_fields};
# Get all the fields whose names don't contain periods. (Fields that
- # contain periods are always handled in MAPPINGS.)
- my @db_fields = grep { $_->name !~ /\./ }
+ # contain periods are always handled in MAPPINGS.)
+ my @db_fields = grep { $_->name !~ /\./ }
@{ Bugzilla->fields({ obsolete => 0 }) };
my %full_map = (%{ MAPPINGS() }, map { $_->name => $_->name } @db_fields);
@@ -82,7 +82,7 @@ sub FIELD_MAP {
# the mappings, and otherwise "stat" can't match "status".
#
# Also, don't allow searching the _accessible stuff via quicksearch
- # (both because it's unnecessary and because otherwise
+ # (both because it's unnecessary and because otherwise
# "reporter_accessible" and "reporter" both match "rep".
delete @full_map{qw(rep_platform bug_status bug_file_loc bug_group
bug_severity bug_status
@@ -503,7 +503,7 @@ sub _translate_field_name {
}
# Check if we match exactly one custom field, ignoring the cf_ on the
- # custom fields (to allow people to type things like "build" for
+ # custom fields (to allow people to type things like "build" for
# "cf_build").
my %cfless;
foreach my $name (@field_names) {
@@ -534,7 +534,7 @@ sub _translate_field_name {
sub _special_field_syntax {
my ($word, $negate) = @_;
return unless defined($word);
-
+
# P1-5 Syntax
if ($word =~ m/^P(\d+)(?:-(\d+))?$/i) {
my ($p_start, $p_end) = ($1, $2);
@@ -564,26 +564,26 @@ sub _special_field_syntax {
addChart('priority', 'anyexact', $prios, $negate);
return 1;
}
- return 0;
+ return 0;
}
sub _default_quicksearch_word {
my ($word, $negate) = @_;
return unless defined($word);
-
+
if (!grep { lc($word) eq $_ } PRODUCT_EXCEPTIONS and length($word) > 2) {
addChart('product', 'substring', $word, $negate);
}
-
+
if (!grep { lc($word) eq $_ } COMPONENT_EXCEPTIONS and length($word) > 2) {
addChart('component', 'substring', $word, $negate);
}
-
+
my @legal_keywords = map($_->name, Bugzilla::Keyword->get_all);
if (grep { lc($word) eq lc($_) } @legal_keywords) {
addChart('keywords', 'substring', $word, $negate);
}
-
+
addChart('alias', 'substring', $word, $negate);
addChart('short_desc', 'substring', $word, $negate);
addChart('status_whiteboard', 'substring', $word, $negate);
diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm
index 21d49c2d8..23507c039 100644
--- a/Bugzilla/Search/Saved.pm
+++ b/Bugzilla/Search/Saved.pm
@@ -96,7 +96,7 @@ sub check {
return $search if $search->user->id == $user->id;
if (!$search->shared_with_group
- or !$user->in_group($search->shared_with_group))
+ or !$user->in_group($search->shared_with_group))
{
ThrowUserError('missing_query', { name => $search->name,
sharer_id => $search->user->id });
@@ -150,7 +150,7 @@ sub create {
my $lif = delete $params->{link_in_footer};
my $obj = $class->insert_create_data($params);
if ($lif) {
- $dbh->do('INSERT INTO namedqueries_link_in_footer
+ $dbh->do('INSERT INTO namedqueries_link_in_footer
(user_id, namedquery_id) VALUES (?,?)',
undef, $params->{userid}, $obj->id);
}
@@ -220,7 +220,7 @@ sub edit_link {
my ($self) = @_;
return $self->{edit_link} if defined $self->{edit_link};
my $cgi = new Bugzilla::CGI($self->url);
- if (!$cgi->param('query_type')
+ if (!$cgi->param('query_type')
|| !IsValidQueryType($cgi->param('query_type')))
{
$cgi->param('query_type', 'advanced');
@@ -235,7 +235,7 @@ sub used_in_whine {
($self->{used_in_whine}) = Bugzilla->dbh->selectrow_array(
'SELECT 1 FROM whine_events INNER JOIN whine_queries
ON whine_events.id = whine_queries.eventid
- WHERE whine_events.owner_userid = ? AND query_name = ?', undef,
+ WHERE whine_events.owner_userid = ? AND query_name = ?', undef,
$self->{userid}, $self->name) || 0;
return $self->{used_in_whine};
}
@@ -247,7 +247,7 @@ sub link_in_footer {
my $user_id = $user ? $user->id : Bugzilla->user->id;
my $link_in_footer = Bugzilla->dbh->selectrow_array(
'SELECT 1 FROM namedqueries_link_in_footer
- WHERE namedquery_id = ? AND user_id = ?',
+ WHERE namedquery_id = ? AND user_id = ?',
undef, $self->id, $user_id) || 0;
$self->{link_in_footer} = $link_in_footer if !$user;
return $link_in_footer;
@@ -261,7 +261,7 @@ sub shared_with_group {
my ($group_id) = Bugzilla->dbh->selectrow_array(
'SELECT group_id FROM namedquery_group_map WHERE namedquery_id = ?',
undef, $self->id);
- $self->{shared_with_group} = $group_id ? new Bugzilla::Group($group_id)
+ $self->{shared_with_group} = $group_id ? new Bugzilla::Group($group_id)
: undef;
return $self->{shared_with_group};
}