Skip to content

Commit

Permalink
Bug 1565872 - Fix miscellaneous typos and spelling inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshino authored Jul 19, 2019
1 parent 677ffa2 commit e6a74f0
Show file tree
Hide file tree
Showing 315 changed files with 740 additions and 740 deletions.
2 changes: 1 addition & 1 deletion .perlcriticrc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ severity = 2

# This is not a good policy.
# Non-explicit return is often easier to read.
# think of javascript arrow functions.
# think of JavaScript arrow functions.
[-Subroutines::RequireFinalReturn]

# This test is technically correct but I do not care.
Expand Down
24 changes: 12 additions & 12 deletions Bugzilla.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ sub init_page {
Bugzilla::Logging->fields->{remote_ip} = remote_ip();
}

# Because this function is run live from perl "use" commands of
# Because this function is run live from Perl "use" commands of
# other scripts, we're skipping the rest of this function if we get here
# during a perl syntax check (perl -c, like we do during the
# during a Perl syntax check (perl -c, like we do during the
# 001compile.t test).
return if $^C;

Expand Down Expand Up @@ -717,7 +717,7 @@ sub local_timezone {
||= DateTime::TimeZone->new(name => 'local');
}

# Send messages to syslog for the auditing systems (eg. mozdef) to pick up.
# Send messages to syslog for the auditing systems (e.g. mozdef) to pick up.
sub audit {
my (undef, $message) = @_;
state $logger = Log::Log4perl->get_logger("audit");
Expand Down Expand Up @@ -885,7 +885,7 @@ all passed from the caller, and the caller's caller, and....
=item *
We can reuse objects across requests using mod_perl where appropriate (eg
We can reuse objects across requests using mod_perl where appropriate (e.g.
templates), whilst destroying those which are only valid for a single request
(such as the current user)
Expand All @@ -895,7 +895,7 @@ Note that items accessible via this object are demand-loaded when requested.
For something to be added to this object, it should either be able to benefit
from persistence when run under mod_perl (such as the a C<template> object),
or should be something which is globally required by a large ammount of code
or should be something which is globally required by a large amount of code
(such as the current C<user> object).
=head1 METHODS
Expand Down Expand Up @@ -1022,7 +1022,7 @@ If false (or not specified), this method will return an arrayref of
the requested fields.
If true, this method will return a hashref of fields, where the keys
are field names and the valules are L<Bugzilla::Field> objects.
are field names and the values are L<Bugzilla::Field> objects.
=item C<type>
Expand Down Expand Up @@ -1102,7 +1102,7 @@ Change the database object to refer to the main database.
The current Parameters of Bugzilla, as a hashref. If C<data/params>
does not exist, then we return an empty hashref. If C<data/params>
is unreadable or is not valid perl, we C<die>.
is unreadable or is not valid Perl, we C<die>.
=item C<local_timezone>
Expand All @@ -1123,7 +1123,7 @@ of features, see C<OPTIONAL_MODULES> in C<Bugzilla::Install::Requirements>.
=item C<audit>
Feeds the provided message into our centralised auditing system.
Feeds the provided message into our centralized auditing system.
=item C<markdown>
Expand All @@ -1143,7 +1143,7 @@ collisions.
=item B<Request Cache>
The request cache is a hashref which supports caching any perl variable for the
The request cache is a hashref which supports caching any Perl variable for the
duration of the current request. At the end of the current request the contents
of this cache are cleared.
Expand All @@ -1155,7 +1155,7 @@ Bugzilla.
=item C<request_cache>
Returns a hashref which can be checked and modified to store any perl variable
Returns a hashref which can be checked and modified to store any Perl variable
for the duration of the current request.
=item C<clear_request_cache>
Expand All @@ -1166,7 +1166,7 @@ Removes all entries from the C<request_cache>.
=item B<Process Cache>
The process cache is a hashref which support caching of any perl variable. If
The process cache is a hashref which support caching of any Perl variable. If
Bugzilla is configured to run using Apache mod_perl, the contents of this cache
are persisted across requests for the lifetime of the Apache worker process
(which varies depending on the SizeLimit configuration in mod_perl.pl).
Expand All @@ -1181,7 +1181,7 @@ is running (for example the path where Bugzilla is installed).
=item C<process_cache>
Returns a hashref which can be checked and modified to store any perl variable
Returns a hashref which can be checked and modified to store any Perl variable
for the duration of the current process (mod_perl) or request (mod_cgi).
=back
Expand Down
12 changes: 6 additions & 6 deletions Bugzilla/App/Command/report_ping.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use Mojo::Util 'getopt';
use PerlX::Maybe 'maybe';
use Try::Tiny;

has description => 'send a report ping to a url';
has description => 'send a report ping to a URL';
has usage => sub { shift->extract_usage };

sub run {
Expand Down Expand Up @@ -130,7 +130,7 @@ __END__
=head1 NAME
Bugzilla::App::Command::report_ping - descriptionsend a report ping to a url';
Bugzilla::App::Command::report_ping - Send a report ping to a URL';
=head1 SYNOPSIS
Expand All @@ -140,17 +140,17 @@ Bugzilla::App::Command::report_ping - descriptionsend a report ping to a url';
Options:
-h, --help Print a brief help message and exits.
-u, --base-url URL to send the json documents to.
-u, --base-url URL to send the JSON documents to.
-r, --rows num (Optional) Number of requests to send at once. Default: 10.
-p, --page num (Optional) Page to start on. Default: 1
--since str (Optional) Typically the date of the last run.
--class word (Optional) Report class to use. Default: Simple
--test Validate the json documents against the json schema.
--dump-schema Print the json schema.
--test Validate the JSON documents against the JSON schema.
--dump-schema Print the JSON schema.
=head1 DESCRIPTION
send a report ping to a url.
send a report ping to a URL.
=head1 ATTRIBUTES
Expand Down
6 changes: 3 additions & 3 deletions Bugzilla/Attachment/PatchReader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ sub process_diff {

setup_template_patch_reader($last_reader, $format, $context, $vars);

# The patch is going to be displayed in a HTML page and if the utf8
# param is enabled, we have to encode attachment data as utf8.
# The patch is going to be displayed in a HTML page and if the UTF-8
# param is enabled, we have to encode attachment data as UTF-8.
if (Bugzilla->params->{'utf8'}) {
$attachment->data; # Populate ->{data}
utf8::decode($attachment->{data});
Expand All @@ -106,7 +106,7 @@ sub process_interdiff {
}
}

# Encode attachment data as utf8 if it's going to be displayed in a HTML
# Encode attachment data as UTF-8 if it's going to be displayed in a HTML
# page using the UTF-8 encoding.
if ($format ne 'raw' && Bugzilla->params->{'utf8'}) {
$old_attachment->data; # Populate ->{data}
Expand Down
4 changes: 2 additions & 2 deletions Bugzilla/Auth.pm
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ on what constant you pass into it:
=head2 C<LOGIN_OPTIONAL>
A login is never required to access this data. Attempting to login is
still useful, because this allows the page to be personalised. Note that
still useful, because this allows the page to be personalized. Note that
an incorrect login will still trigger an error, even though the lack of
a login will be OK.
Expand Down Expand Up @@ -518,7 +518,7 @@ password.
If an Info Getter returns only a C<user_id> and no username/password,
then it MUST NOT require verification. If an Info Getter requires
verfication, then it MUST return at least a C<username>.
verification, then it MUST return at least a C<username>.
=head2 The Verifier
Expand Down
2 changes: 1 addition & 1 deletion Bugzilla/Auth/Login/APIKey.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sub get_login_info {

if (!$api_key or $api_key->api_key ne $api_key_text) {

# The second part checks the correct capitalisation. Silly MySQL
# The second part checks the correct capitalization. Silly MySQL
ThrowUserError("api_key_not_valid");
}
elsif ( $api_key->sticky
Expand Down
8 changes: 4 additions & 4 deletions Bugzilla/Bug.pm
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ sub create {
my $dbh = Bugzilla->dbh;

# BMO - allow parameter alteration before creation. also add support for
# fields which are not bug columns (eg bug_mentors). extensions should move
# fields which are not bug columns (e.g. bug_mentors). extensions should move
# fields from $params to $stash, then use the bug_end_of_create hook to
# update the database
my $stash = {};
Expand Down Expand Up @@ -3553,7 +3553,7 @@ sub remove_see_also {
{field => 'see_also', oldvalue => $url, privs => $privs});
}

# Since we remove also the url from the referenced bug,
# Since we remove also the URL from the referenced bug,
# we need to notify changes for that bug too.
$removed_bug_url = $removed_bug_url->[0];
if ( !$skip_recursion
Expand Down Expand Up @@ -4314,7 +4314,7 @@ sub groups {
}

# BMO: if required, hack in groups exposed by -visible membership
# (eg mozilla-employee-confidential-visible), so reporters can add the
# (e.g. mozilla-employee-confidential-visible), so reporters can add the
# bug to a group on show_bug.
# if the bug is already in the group, the user will not be able to remove
# it unless they are a true group member.
Expand Down Expand Up @@ -4746,7 +4746,7 @@ sub _join_activity_entries {
}
}

# Assume bug_file_loc contain a single url, don't insert a delimiter
# Assume bug_file_loc contain a single URL, don't insert a delimiter
if ($field eq 'bug_file_loc') {
return $current_change . $new_change;
}
Expand Down
4 changes: 2 additions & 2 deletions Bugzilla/BugMail.pm
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ sub _get_new_bugmail_fields {
my @diffs;

# Show fields in the same order as the DEFAULT_FIELDS list, which mirrors
# 4.0's behavour and provides sane grouping of similar fields.
# Any additional fields are sorted by descrsiption
# 4.0's behavior and provides sane grouping of similar fields.
# Any additional fields are sorted by description
my @prepend;
foreach my $name (map { $_->{name} } Bugzilla::Field::DEFAULT_FIELDS) {
my $idx = firstidx { $_->name eq $name } @fields;
Expand Down
2 changes: 1 addition & 1 deletion Bugzilla/BugUrl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use constant VALIDATORS => {
};

# This is the order we go through all of subclasses and
# pick the first one that should handle the url. New
# pick the first one that should handle the URL. New
# subclasses should be added at the end of the list.
use constant SUB_CLASSES => qw(
Bugzilla::BugUrl::Bugzilla::Local
Expand Down
4 changes: 2 additions & 2 deletions Bugzilla/BugUrl/Bugzilla/Local.pm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sub should_handle {

# Check if it is a local Bugzilla uri and call
# Bugzilla::BugUrl::Bugzilla to check if it's a valid Bugzilla
# see also url.
# See Also URL.
my $canonical_local = URI->new($class->local_uri)->canonical;
if ( $canonical_local->authority eq $uri->canonical->authority
and $canonical_local->path eq $uri->canonical->path)
Expand All @@ -69,7 +69,7 @@ sub _check_value {
}
else {
# It's not a word, then we have to check
# if it's a valid Bugzilla url.
# if it's a valid Bugzilla URL.
$uri = $class->SUPER::_check_value($uri);
}

Expand Down
2 changes: 1 addition & 1 deletion Bugzilla/BugUserLastVisit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use warnings;
use parent qw(Bugzilla::Object);

#####################################################################
# Overriden Constants that are used as methods
# Overridden Constants that are used as methods
#####################################################################

use constant DB_TABLE => 'bug_user_last_visit';
Expand Down
24 changes: 12 additions & 12 deletions Bugzilla/CGI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ sub new {
if (!grep($_ eq $script, @whitelist)) {

# apache collapses // to / in $ENV{PATH_INFO} but not in $self->path_info.
# url() requires the full path in ENV in order to generate the correct url.
# url() requires the full path in ENV in order to generate the correct URL.
$ENV{PATH_INFO} = $path;
DEBUG("redirecting because we see PATH_INFO and don't like it");
print $self->redirect($self->url(-path => 0, -query => 1));
Expand All @@ -88,7 +88,7 @@ sub new {
if (my $C = $Bugzilla::App::CGI::C) {
if ($C->url_is_attachment_base and $script ne 'attachment.cgi') {
DEBUG(
"Redirecting to urlbase because the url is in the attachment base and not attachment.cgi"
"Redirecting to urlbase because the URL is in the attachment base and not attachment.cgi"
);
$self->redirect_to_urlbase();
}
Expand All @@ -113,7 +113,7 @@ sub new {
# ends up here, and calls ThrowCodeError, and then recurses forever.
# So don't use it.
# In fact, we can't use templates at all, because we need a CGI object
# to determine the template lang as well as the current url (from the
# to determine the template lang as well as the current URL (from the
# template)
# Since this is an internal error which indicates a severe browser bug,
# just die.
Expand All @@ -139,7 +139,7 @@ sub target_uri {
}

# We want this sorted plus the ability to exclude certain params
sub canonicalise_query {
sub canonicalize_query {
my ($self, @exclude) = @_;

# Reconstruct the URL by concatenating the sorted param=value pairs
Expand Down Expand Up @@ -326,8 +326,8 @@ sub _prevent_unsafe_response {

if (Bugzilla->usage_mode == USAGE_MODE_BROWSER) {

# Safe content types are ones that arn't images.
# For now let's assume plain text and html are not valid images.
# Safe content types are ones that aren't images.
# For now let's assume plain text and HTML are not valid images.
my $content_type = $headers->{'-type'} // $headers->{'-content_type'}
// 'text/html';
my $is_safe_content_type = $content_type =~ $safe_content_type_re;
Expand Down Expand Up @@ -388,7 +388,7 @@ sub header {
}

# We generate a cookie and store it in the request cache
# To initiate github login, a form POSTs to github.cgi with the
# To initiate GitHub login, a form POSTs to github.cgi with the
# github_secret as a parameter. It must match the github_secret cookie.
# this prevents some types of redirection attacks.
unless ($user->id || $self->{bz_redirecting}) {
Expand Down Expand Up @@ -514,7 +514,7 @@ sub param {
sub _fix_utf8 {
my $input = shift;

# The is_utf8 is here in case CGI gets smart about utf8 someday.
# The is_utf8 is here in case CGI gets smart about UTF-8 someday.
utf8::decode($input) if defined $input && !ref $input && !utf8::is_utf8($input);
return $input;
}
Expand Down Expand Up @@ -626,7 +626,7 @@ sub redirect_search_url {
# are only redirected if they're under the CGI_URI_LIMIT though.
my $self_url = $self->self_url();
if ($self->request_method() ne 'POST' or length($self_url) < CGI_URI_LIMIT) {
DEBUG("Redirecting search url");
DEBUG("Redirecting search URL");
print $self->redirect(-url => $self_url);
exit;
}
Expand Down Expand Up @@ -737,7 +737,7 @@ Bugzilla::CGI - CGI handling for Bugzilla
This package inherits from the standard CGI module, to provide additional
Bugzilla-specific functionality. In general, see L<the CGI.pm docs|CGI> for
documention.
documentation.
=head1 CHANGES FROM L<CGI.PM|CGI>
Expand All @@ -758,10 +758,10 @@ I<Bugzilla::CGI> also includes additional functions.
=over 4
=item C<canonicalise_query(@exclude)>
=item C<canonicalize_query(@exclude)>
This returns a sorted string of the parameters whose values are non-empty,
suitable for use in a url.
suitable for use in a URL.
Values in C<@exclude> are not included in the result.
Expand Down
4 changes: 2 additions & 2 deletions Bugzilla/CGI/ContentSecurityPolicy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ style attributes are disabled unless you specify 'unsafe-inline'.
=head2 upgrade_insecure_requests
The upgrade-insecure-requests directive instructs user agents to treat all of a
site's unsecure URL's (those serverd over HTTP) as though they have been
site's insecure URL's (those served over HTTP) as though they have been
replaced with secure URL's (those served over HTTPS). This directive is intended
for web sites with large numbers of unsecure legacy URL's that need to be
for web sites with large numbers of insecure legacy URL's that need to be
rewritten.
=head1 METHODS
Expand Down
2 changes: 1 addition & 1 deletion Bugzilla/CPAN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ are installed.
=head2 C<cpan_meta>
Returns a L<CPAN::Meta> from the contents of MYMETA.json in the bugzilla directory.
Returns a L<CPAN::Meta> from the contents of MYMETA.json in the Bugzilla directory.
=head2 C<preload_features()>
Expand Down
Loading

0 comments on commit e6a74f0

Please sign in to comment.