From 37722eca39874bb6abdcd120e3e458bd62dea62b Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 5 Jul 2017 11:43:18 -0700 Subject: Bug 1377933 - Remove trailing whitespace from all perl files --- extensions/BMO/Extension.pm | 36 ++++++++++++++++++------------------ extensions/BMO/lib/Constants.pm | 2 +- extensions/BMO/lib/WebService.pm | 20 ++++++++++---------- 3 files changed, 29 insertions(+), 29 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 09bd347d2..0f63ffbb4 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -116,7 +116,7 @@ sub template_before_process { my @order_columns; foreach my $o (@orderstrings) { $o =~ s/bugs.//; - $o = $db_order_column_name_map{$o} if + $o = $db_order_column_name_map{$o} if grep($_ eq $o, keys(%db_order_column_name_map)); next if (grep($_ eq $o, @order_columns)); push(@order_columns, $o); @@ -124,7 +124,7 @@ sub template_before_process { $vars->{'order_columns'} = \@order_columns; - # fields that have a custom sortkey. (So they are correctly sorted + # fields that have a custom sortkey. (So they are correctly sorted # when using js) my @sortkey_fields = qw(bug_status resolution bug_severity priority rep_platform op_sys); @@ -141,7 +141,7 @@ sub template_before_process { my $format = $1; if (!$vars->{'cloned_bug_id'}) { # Allow status whiteboard values to be bookmarked - $vars->{'status_whiteboard'} = + $vars->{'status_whiteboard'} = Bugzilla->cgi->param('status_whiteboard') || ""; } @@ -159,7 +159,7 @@ sub template_before_process { if ($file =~ /^list\/list/ || $file =~ /^bug\/create\/create[\.-]/) { - # hack to allow the bug entry templates to use check_can_change_field + # hack to allow the bug entry templates to use check_can_change_field # to see if various field values should be available to the current user. $vars->{'default'} = Bugzilla::Extension::BMO::FakeBug->new($vars->{'default'} || {}); } @@ -238,7 +238,7 @@ sub page_before_template { # were changed for better performance and are now only loaded once. # I have not found an easy way to allow our hook template to check if # it is called from pages/fields.html.tmpl. So we set a value in request_cache - # that our hook template can see. + # that our hook template can see. Bugzilla->request_cache->{'bmo_fields_page'} = 1; } elsif ($page eq 'query_database.html') { @@ -423,7 +423,7 @@ sub active_custom_fields { my $component_name = blessed $component ? $component->name : $component; my @tmp_fields; - foreach my $field (@$$fields) { + foreach my $field (@$$fields) { next if cf_hidden_in_product($field->name, $product_name, $component_name); push(@tmp_fields, $field); } @@ -445,7 +445,7 @@ sub cf_hidden_in_product { ? $product_name->name : $product_name; - # Also in buglist.cgi, we pass in a list of components instead + # Also in buglist.cgi, we pass in a list of components instead # of a single component name everywhere else. my $component_list = []; if ($component_name) { @@ -482,7 +482,7 @@ sub cf_hidden_in_product { } # If product matches and at at least one component matches - # from component_list (if a matching component was required), + # from component_list (if a matching component was required), # we allow the field to be seen if ($product eq $product_name && (!@$components || $found_component)) { return 0; @@ -495,7 +495,7 @@ sub cf_hidden_in_product { return 0; } -# Purpose: CC certain email addresses on bugmail when a bug is added or +# Purpose: CC certain email addresses on bugmail when a bug is added or # removed from a particular group. sub bugmail_recipients { my ($self, $args) = @_; @@ -529,9 +529,9 @@ sub bugmail_recipients { sub _cc_if_special_group { my ($group, $recipients) = @_; - + return if !$group; - + if (exists $group_change_notification{$group}) { foreach my $login (@{ $group_change_notification{$group} }) { my $id = login_to_id($login); @@ -542,7 +542,7 @@ sub _cc_if_special_group { sub _check_trusted { my ($field, $trusted, $priv_results) = @_; - + my $needed_group = $trusted->{'_default'} || ""; foreach my $dfield (keys %$trusted) { if ($field =~ $dfield) { @@ -551,7 +551,7 @@ sub _check_trusted { } if ($needed_group && !Bugzilla->user->in_group($needed_group)) { push (@$priv_results, PRIVILEGES_REQUIRED_EMPOWERED); - } + } } sub _is_field_set { @@ -616,7 +616,7 @@ sub bug_check_can_change_field { } } elsif ($user->in_group('canconfirm', $bug->{'product_id'})) { - # Canconfirm is really "cantriage"; users with canconfirm can also mark + # Canconfirm is really "cantriage"; users with canconfirm can also mark # bugs as DUPLICATE, WORKSFORME, and INCOMPLETE. if ($field eq 'bug_status' && is_open_state($old_value) @@ -638,9 +638,9 @@ sub bug_check_can_change_field { } elsif ($field eq 'bug_status') { # Disallow reopening of bugs which have been resolved for > 1 year - if (is_open_state($new_value) + if (is_open_state($new_value) && !is_open_state($old_value) - && $bug->resolution eq 'FIXED') + && $bug->resolution eq 'FIXED') { my $days_ago = DateTime->now(time_zone => Bugzilla->local_timezone); $days_ago->subtract(days => 365); @@ -789,7 +789,7 @@ sub bug_format_comment { # link to hg.m.o # Note: for grouping in this regexp, always use non-capturing parentheses. - my $hgrepos = join('|', qw!(?:releases/)?comm-[\w.]+ + my $hgrepos = join('|', qw!(?:releases/)?comm-[\w.]+ (?:releases/)?mozilla-[\w.]+ (?:releases/)?mobile-[\w.]+ tracemonkey @@ -2541,7 +2541,7 @@ sub install_filesystem { # our repository. We already have this information in the (static) # contribute.json file, so parse that in my $json = JSON::XS->new->pretty->utf8->canonical(); - my $contribute = eval { + my $contribute = eval { $json->decode(scalar read_file(bz_locations()->{cgi_path} . "/contribute.json")); }; my $commit = `git rev-parse HEAD`; diff --git a/extensions/BMO/lib/Constants.pm b/extensions/BMO/lib/Constants.pm index 3670cb9a2..8227208c8 100644 --- a/extensions/BMO/lib/Constants.pm +++ b/extensions/BMO/lib/Constants.pm @@ -17,7 +17,7 @@ our @EXPORT = qw( DEV_ENGAGE_DISCUSS_NEEDINFO ); -# Maximum attachment size in lines that will be sent with a +# Maximum attachment size in lines that will be sent with a # requested attachment flag notification. use constant REQUEST_MAX_ATTACH_LINES => 1000; diff --git a/extensions/BMO/lib/WebService.pm b/extensions/BMO/lib/WebService.pm index 6ee7cfa6e..327c8563f 100644 --- a/extensions/BMO/lib/WebService.pm +++ b/extensions/BMO/lib/WebService.pm @@ -4,7 +4,7 @@ # 1.1 (the "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ # -# Software distributed under the License is distributed on an "AS IS" basis, +# Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for # the specific language governing rights and limitations under the License. # @@ -40,7 +40,7 @@ sub getBugsConfirmer { my ($self, $params) = validate(@_, 'names'); my $dbh = Bugzilla->dbh; - defined($params->{names}) + defined($params->{names}) || ThrowCodeError('params_required', { function => 'BMO.getBugsConfirmer', params => ['names'] }); @@ -53,7 +53,7 @@ sub getBugsConfirmer { my $query = "SELECT DISTINCT bugs_activity.bug_id FROM bugs_activity - LEFT JOIN bug_group_map + LEFT JOIN bug_group_map ON bugs_activity.bug_id = bug_group_map.bug_id WHERE bugs_activity.fieldid = ? AND bugs_activity.added = 'NEW' @@ -75,7 +75,7 @@ sub getBugsVerifier { my ($self, $params) = validate(@_, 'names'); my $dbh = Bugzilla->dbh; - defined($params->{names}) + defined($params->{names}) || ThrowCodeError('params_required', { function => 'BMO.getBugsVerifier', params => ['names'] }); @@ -88,7 +88,7 @@ sub getBugsVerifier { my $query = "SELECT DISTINCT bugs_activity.bug_id FROM bugs_activity - LEFT JOIN bug_group_map + LEFT JOIN bug_group_map ON bugs_activity.bug_id = bug_group_map.bug_id WHERE bugs_activity.fieldid = ? AND bugs_activity.removed = 'RESOLVED' @@ -120,7 +120,7 @@ This module contains API methods that are useful to user's of bugzilla.mozilla.o =head1 METHODS -See L for a description of how parameters are passed, +See L for a description of how parameters are passed, and what B, B, and B mean. =head2 getBugsConfirmer @@ -131,7 +131,7 @@ B =item B -This method returns public bug ids that a given user has confirmed (changed from +This method returns public bug ids that a given user has confirmed (changed from C to C). =item B @@ -140,7 +140,7 @@ You pass a field called C that is a list of Bugzilla login names to find =over -=item C (array) - An array of strings representing Bugzilla login names. +=item C (array) - An array of strings representing Bugzilla login names. =back @@ -169,7 +169,7 @@ B =item B This method returns public bug ids that a given user has verified (changed from -C to C). +C to C). =item B @@ -177,7 +177,7 @@ You pass a field called C that is a list of Bugzilla login names to find =over -=item C (array) - An array of strings representing Bugzilla login names. +=item C (array) - An array of strings representing Bugzilla login names. =back -- cgit v1.2.3-24-g4f1b