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 --- Bugzilla/Attachment.pm | 6 +- Bugzilla/Attachment/PatchReader.pm | 6 +- Bugzilla/Auth.pm | 38 +-- Bugzilla/Auth/Login.pm | 4 +- Bugzilla/Auth/Login/CGI.pm | 2 +- Bugzilla/Auth/Login/Cookie.pm | 4 +- Bugzilla/Auth/Login/Env.pm | 2 +- Bugzilla/Auth/Login/Stack.pm | 6 +- Bugzilla/Auth/Persist/Cookie.pm | 8 +- Bugzilla/Auth/Verify.pm | 12 +- Bugzilla/Auth/Verify/DB.pm | 2 +- Bugzilla/Auth/Verify/LDAP.pm | 14 +- Bugzilla/BugMail.pm | 24 +- Bugzilla/BugUrl.pm | 2 +- Bugzilla/BugUrl/Bugzilla/Local.pm | 2 +- Bugzilla/BugUrl/Google.pm | 2 +- Bugzilla/CGI.pm | 32 +-- Bugzilla/Chart.pm | 66 ++--- Bugzilla/Comment.pm | 18 +- Bugzilla/Component.pm | 4 +- Bugzilla/Config.pm | 16 +- Bugzilla/Config/Common.pm | 12 +- Bugzilla/Config/GroupSecurity.pm | 6 +- Bugzilla/Config/UserMatch.pm | 6 +- Bugzilla/DB.pm | 192 ++++++------- Bugzilla/DB/Mysql.pm | 92 +++--- Bugzilla/DB/Oracle.pm | 104 +++---- Bugzilla/DB/Pg.pm | 22 +- Bugzilla/DB/Schema.pm | 166 +++++------ Bugzilla/DB/Schema/Mysql.pm | 32 +-- Bugzilla/DB/Schema/Oracle.pm | 66 ++--- Bugzilla/DB/Schema/Pg.pm | 18 +- Bugzilla/DB/Schema/Sqlite.pm | 24 +- Bugzilla/DB/Sqlite.pm | 10 +- Bugzilla/Elastic/Indexer.pm | 2 +- Bugzilla/Elastic/Search.pm | 8 +- Bugzilla/Error.pm | 2 +- Bugzilla/Extension.pm | 78 ++--- Bugzilla/Field.pm | 30 +- Bugzilla/Field/Choice.pm | 16 +- Bugzilla/Field/ChoiceInterface.pm | 14 +- Bugzilla/Flag.pm | 6 +- Bugzilla/FlagType.pm | 10 +- Bugzilla/Group.pm | 18 +- Bugzilla/Hook.pm | 116 ++++---- Bugzilla/Install.pm | 22 +- Bugzilla/Install/DB.pm | 320 ++++++++++----------- Bugzilla/Install/Filesystem.pm | 32 +-- Bugzilla/Install/Localconfig.pm | 20 +- Bugzilla/Install/Util.pm | 18 +- Bugzilla/JobQueue.pm | 4 +- Bugzilla/JobQueue/Runner.pm | 2 +- Bugzilla/Keyword.pm | 10 +- Bugzilla/Mailer.pm | 10 +- Bugzilla/Memcached.pm | 2 +- Bugzilla/Migrate.pm | 64 ++--- Bugzilla/Migrate/Gnats.pm | 32 +-- Bugzilla/Object.pm | 86 +++--- Bugzilla/PatchReader.pm | 2 +- Bugzilla/PatchReader/Raw.pm | 2 +- Bugzilla/Product.pm | 26 +- Bugzilla/RNG.pm | 4 +- Bugzilla/Search.pm | 242 ++++++++-------- Bugzilla/Search/Clause.pm | 2 +- Bugzilla/Search/Quicksearch.pm | 20 +- Bugzilla/Search/Saved.pm | 12 +- Bugzilla/Send/Sendmail.pm | 2 +- Bugzilla/Series.pm | 40 +-- Bugzilla/Status.pm | 8 +- Bugzilla/Template.pm | 56 ++-- Bugzilla/Template/Context.pm | 4 +- Bugzilla/Template/Plugin/Hook.pm | 6 +- Bugzilla/Token.pm | 8 +- Bugzilla/User.pm | 108 +++---- Bugzilla/User/Setting.pm | 22 +- Bugzilla/Util.pm | 32 +-- Bugzilla/WebService.pm | 14 +- Bugzilla/WebService/Bug.pm | 134 ++++----- Bugzilla/WebService/Constants.pm | 6 +- Bugzilla/WebService/Server.pm | 2 +- Bugzilla/WebService/Server/JSONRPC.pm | 28 +- Bugzilla/WebService/Server/REST/Resources/Group.pm | 2 +- Bugzilla/WebService/Server/XMLRPC.pm | 18 +- Bugzilla/WebService/User.pm | 46 +-- Bugzilla/WebService/Util.pm | 12 +- Bugzilla/Whine/Query.pm | 4 +- Bugzilla/Whine/Schedule.pm | 16 +- attachment.cgi | 46 +-- buglist.cgi | 70 ++--- chart.cgi | 16 +- checksetup.pl | 12 +- colchange.cgi | 10 +- collectstats.pl | 34 +-- config.cgi | 4 +- docs/lib/Pod/Simple/HTMLBatch/Bugzilla.pm | 8 +- duplicates.cgi | 12 +- editclassifications.cgi | 2 +- editcomponents.cgi | 4 +- editfields.cgi | 4 +- editflagtypes.cgi | 2 +- editgroups.cgi | 10 +- editkeywords.cgi | 2 +- editmilestones.cgi | 2 +- editproducts.cgi | 6 +- editusers.cgi | 12 +- editvalues.cgi | 2 +- editversions.cgi | 2 +- editwhines.cgi | 6 +- email_in.pl | 16 +- enter_bug.cgi | 18 +- extensions/BMO/Extension.pm | 36 +-- extensions/BMO/lib/Constants.pm | 2 +- extensions/BMO/lib/WebService.pm | 20 +- extensions/Example/Extension.pm | 162 +++++------ .../template/en/default/setup/strings.txt.pl | 2 +- extensions/FlagDefaultRequestee/Extension.pm | 4 +- extensions/FlagDefaultRequestee/lib/Constants.pm | 6 +- extensions/FlagTypeComment/Config.pm | 2 +- extensions/FlagTypeComment/Extension.pm | 14 +- extensions/FlagTypeComment/lib/Constants.pm | 2 +- extensions/LastResolved/Extension.pm | 6 +- extensions/MyDashboard/lib/WebService.pm | 2 +- extensions/Needinfo/Extension.pm | 2 +- extensions/OldBugMove/Extension.pm | 4 +- extensions/Persona/Extension.pm | 4 +- extensions/PhabBugz/lib/Util.pm | 2 +- extensions/ProductDashboard/lib/Queries.pm | 50 ++-- extensions/ProductDashboard/lib/Util.pm | 10 +- extensions/Profanivore/Extension.pm | 4 +- extensions/REMO/Config.pm | 2 +- extensions/Review/lib/WebService.pm | 2 +- extensions/SiteMapIndex/Extension.pm | 10 +- extensions/SiteMapIndex/lib/Constants.pm | 4 +- extensions/SiteMapIndex/lib/Util.pm | 16 +- extensions/Splinter/Extension.pm | 8 +- extensions/Splinter/lib/Util.pm | 16 +- extensions/UserProfile/lib/Util.pm | 2 +- extensions/Voting/Extension.pm | 22 +- extensions/create.pl | 6 +- importxml.pl | 84 +++--- new_bug.cgi | 2 +- page.cgi | 6 +- post_bug.cgi | 4 +- process_bug.cgi | 6 +- query.cgi | 12 +- quips.cgi | 16 +- relogin.cgi | 6 +- report.cgi | 40 +-- reports.cgi | 8 +- request.cgi | 40 +-- runtests.pl | 2 +- sanitycheck.cgi | 28 +- show_activity.cgi | 2 +- show_bug.cgi | 4 +- showdependencygraph.cgi | 8 +- summarize_time.cgi | 20 +- template/en/default/filterexceptions.pl | 166 +++++------ template/en/default/setup/strings.txt.pl | 16 +- testserver.pl | 20 +- token.cgi | 14 +- userprefs.cgi | 22 +- votes.cgi | 2 +- whine.pl | 12 +- whineatnews.pl | 4 +- xmlrpc.cgi | 4 +- xt/lib/Bugzilla/Test/Search.pm | 78 ++--- xt/lib/Bugzilla/Test/Search/Constants.pm | 22 +- xt/lib/Bugzilla/Test/Search/FieldTest.pm | 48 ++-- xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm | 8 +- xt/lib/Bugzilla/Test/Search/OperatorTest.pm | 2 +- xt/lib/Bugzilla/Test/Search/OrTest.pm | 4 +- 171 files changed, 2126 insertions(+), 2126 deletions(-) diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 068ba9e45..0bdb50c9a 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -372,7 +372,7 @@ sub flag_types { my $vars = { target_type => 'attachment', product_id => $self->bug->product_id, component_id => $self->bug->component_id, - attach_id => $self->id, + attach_id => $self->id, active_or_has_flags => $self->bug_id }; return $self->{flag_types} = Bugzilla::Flag->_flag_types($vars); @@ -419,7 +419,7 @@ sub _check_bug { $bug = ref $invocant ? $invocant->bug : $bug; - $bug || ThrowCodeError('param_required', + $bug || ThrowCodeError('param_required', { function => "$invocant->create", param => 'bug' }); ($user->can_see_bug($bug->id) && $user->can_edit_product($bug->product_id)) @@ -430,7 +430,7 @@ sub _check_bug { sub _check_content_type { my ($invocant, $content_type, undef, $params) = @_; - + my $is_patch = ref($invocant) ? $invocant->ispatch : $params->{ispatch}; $content_type = 'text/plain' if $is_patch; $content_type = clean_text($content_type); diff --git a/Bugzilla/Attachment/PatchReader.pm b/Bugzilla/Attachment/PatchReader.pm index fb8b83392..2cfbf2c6b 100644 --- a/Bugzilla/Attachment/PatchReader.pm +++ b/Bugzilla/Attachment/PatchReader.pm @@ -269,8 +269,8 @@ sub setup_patch_readers { } # Add in cvs context if we have the necessary info to do it - if ($context ne 'patch' && Bugzilla->localconfig->{cvsbin} - && Bugzilla->params->{'cvsroot_get'}) + if ($context ne 'patch' && Bugzilla->localconfig->{cvsbin} + && Bugzilla->params->{'cvsroot_get'}) { require Bugzilla::PatchReader::AddCVSContext; # We need to set $cvsbin as global, because PatchReader::CVSClient @@ -301,7 +301,7 @@ sub setup_template_patch_reader { $vars->{'collapsed'} = $cgi->param('collapsed'); $vars->{'context'} = $context; - $vars->{'do_context'} = Bugzilla->localconfig->{cvsbin} + $vars->{'do_context'} = Bugzilla->localconfig->{cvsbin} && Bugzilla->params->{'cvsroot_get'} && !$vars->{'newid'}; # Print everything out. diff --git a/Bugzilla/Auth.pm b/Bugzilla/Auth.pm index 522fbebf3..797ec1122 100644 --- a/Bugzilla/Auth.pm +++ b/Bugzilla/Auth.pm @@ -137,7 +137,7 @@ sub can_change_password { my $verifier = $self->{_verifier}->{successful}; $verifier ||= $self->{_verifier}; my $getter = $self->{_info_getter}->{successful}; - $getter = $self->{_info_getter} + $getter = $self->{_info_getter} if (!$getter || $getter->isa('Bugzilla::Auth::Login::Cookie')); return $verifier->can_change_password && $getter->user_can_create_account; @@ -219,7 +219,7 @@ sub _handle_login_result { } } elsif ($fail_code == AUTH_NODATA) { - $self->{_info_getter}->fail_nodata($self) + $self->{_info_getter}->fail_nodata($self) if $login_type == LOGIN_REQUIRED; # If we're not LOGIN_REQUIRED, we just return the default user. @@ -230,9 +230,9 @@ sub _handle_login_result { # the password was just wrong. (This makes it harder for a cracker # to find account names by brute force) elsif ($fail_code == AUTH_LOGINFAILED or $fail_code == AUTH_NO_SUCH_USER) { - my $remaining_attempts = MAX_LOGIN_ATTEMPTS + my $remaining_attempts = MAX_LOGIN_ATTEMPTS - ($result->{failure_count} || 0); - ThrowUserError("invalid_username_or_password", + ThrowUserError("invalid_username_or_password", { remaining => $remaining_attempts }); } # The account may be disabled @@ -247,18 +247,18 @@ sub _handle_login_result { elsif ($fail_code == AUTH_LOCKOUT) { my $attempts = $user->account_ip_login_failures; - # We want to know when the account will be unlocked. This is + # We want to know when the account will be unlocked. This is # determined by the 5th-from-last login failure (or more/less than # 5th, if MAX_LOGIN_ATTEMPTS is not 5). my $determiner = $attempts->[scalar(@$attempts) - MAX_LOGIN_ATTEMPTS]; - my $unlock_at = datetime_from($determiner->{login_time}, + my $unlock_at = datetime_from($determiner->{login_time}, Bugzilla->local_timezone); $unlock_at->add(minutes => LOGIN_LOCKOUT_INTERVAL); # If we were *just* locked out, notify the maintainer about the # lockout. if ($result->{just_locked_out}) { - # We're sending to the maintainer, who may be not a Bugzilla + # We're sending to the maintainer, who may be not a Bugzilla # account, but just an email address. So we use the # installation's default language for sending the email. my $default_settings = Bugzilla::User::Setting::get_defaults(); @@ -289,7 +289,7 @@ sub _handle_login_result { } $unlock_at->set_time_zone($user->timezone); - ThrowUserError('account_locked', + ThrowUserError('account_locked', { ip_addr => $determiner->{ip_addr}, unlock_at => $unlock_at }); } # If we get here, then we've run out of options, which shouldn't happen. @@ -314,11 +314,11 @@ Bugzilla::Auth - An object that authenticates the login credentials for Handles authentication for Bugzilla users. Authentication from Bugzilla involves two sets of modules. One set is -used to obtain the username/password (from CGI, email, etc), and the -other set uses this data to authenticate against the datasource +used to obtain the username/password (from CGI, email, etc), and the +other set uses this data to authenticate against the datasource (the Bugzilla DB, LDAP, PAM, etc.). -Modules for obtaining the username/password are subclasses of +Modules for obtaining the username/password are subclasses of L, and modules for authenticating are subclasses of L. @@ -342,11 +342,11 @@ An error occurred when trying to use the login mechanism. The hashref will also contain an C element, which is the name of an error from C