diff options
author | Perl Tidy <perltidy@bugzilla.org> | 2018-12-05 21:38:52 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-12-05 23:49:08 +0100 |
commit | 8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch) | |
tree | 9d270f173330ca19700e0ba9f2ee931300646de1 /Bugzilla/User/Setting | |
parent | a7bb5a65b71644d9efce5fed783ed545b9336548 (diff) | |
download | bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz |
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 'Bugzilla/User/Setting')
-rw-r--r-- | Bugzilla/User/Setting/Lang.pm | 6 | ||||
-rw-r--r-- | Bugzilla/User/Setting/Skin.pm | 43 | ||||
-rw-r--r-- | Bugzilla/User/Setting/Timezone.pm | 22 |
3 files changed, 38 insertions, 33 deletions
diff --git a/Bugzilla/User/Setting/Lang.pm b/Bugzilla/User/Setting/Lang.pm index a3032b9fc..5f49bc6e4 100644 --- a/Bugzilla/User/Setting/Lang.pm +++ b/Bugzilla/User/Setting/Lang.pm @@ -16,11 +16,11 @@ use base qw(Bugzilla::User::Setting); use Bugzilla::Constants; sub legal_values { - my ($self) = @_; + my ($self) = @_; - return $self->{'legal_values'} if defined $self->{'legal_values'}; + return $self->{'legal_values'} if defined $self->{'legal_values'}; - return $self->{'legal_values'} = Bugzilla->languages; + return $self->{'legal_values'} = Bugzilla->languages; } 1; diff --git a/Bugzilla/User/Setting/Skin.pm b/Bugzilla/User/Setting/Skin.pm index f0ea502ef..f4d82007b 100644 --- a/Bugzilla/User/Setting/Skin.pm +++ b/Bugzilla/User/Setting/Skin.pm @@ -21,28 +21,31 @@ use File::Basename; use constant BUILTIN_SKIN_NAMES => ['standard']; sub legal_values { - my ($self) = @_; - - return $self->{'legal_values'} if defined $self->{'legal_values'}; - - my $dirbase = bz_locations()->{'skinsdir'} . '/contrib'; - # Avoid modification of the list BUILTIN_SKIN_NAMES points to by copying the - # list over instead of simply writing $legal_values = BUILTIN_SKIN_NAMES. - my @legal_values = @{(BUILTIN_SKIN_NAMES)}; - - foreach my $direntry (glob(catdir($dirbase, '*'))) { - if (-d $direntry) { - # Stylesheet set - next if basename($direntry) =~ /^cvs$/i; - push(@legal_values, basename($direntry)); - } - elsif ($direntry =~ /\.css$/) { - # Single-file stylesheet - push(@legal_values, basename($direntry)); - } + my ($self) = @_; + + return $self->{'legal_values'} if defined $self->{'legal_values'}; + + my $dirbase = bz_locations()->{'skinsdir'} . '/contrib'; + + # Avoid modification of the list BUILTIN_SKIN_NAMES points to by copying the + # list over instead of simply writing $legal_values = BUILTIN_SKIN_NAMES. + my @legal_values = @{(BUILTIN_SKIN_NAMES)}; + + foreach my $direntry (glob(catdir($dirbase, '*'))) { + if (-d $direntry) { + + # Stylesheet set + next if basename($direntry) =~ /^cvs$/i; + push(@legal_values, basename($direntry)); + } + elsif ($direntry =~ /\.css$/) { + + # Single-file stylesheet + push(@legal_values, basename($direntry)); } + } - return $self->{'legal_values'} = \@legal_values; + return $self->{'legal_values'} = \@legal_values; } 1; diff --git a/Bugzilla/User/Setting/Timezone.pm b/Bugzilla/User/Setting/Timezone.pm index a9515259e..6e20f1fc2 100644 --- a/Bugzilla/User/Setting/Timezone.pm +++ b/Bugzilla/User/Setting/Timezone.pm @@ -18,19 +18,21 @@ use base qw(Bugzilla::User::Setting); use Bugzilla::Constants; sub legal_values { - my ($self) = @_; + my ($self) = @_; - return $self->{'legal_values'} if defined $self->{'legal_values'}; + return $self->{'legal_values'} if defined $self->{'legal_values'}; - my @timezones = DateTime::TimeZone->all_names; - # Remove old formats, such as CST6CDT, EST, EST5EDT. - @timezones = grep { $_ =~ m#.+/.+#} @timezones; - # Append 'local' to the list, which will use the timezone - # given by the server. - push(@timezones, 'local'); - push(@timezones, 'UTC'); + my @timezones = DateTime::TimeZone->all_names; - return $self->{'legal_values'} = \@timezones; + # Remove old formats, such as CST6CDT, EST, EST5EDT. + @timezones = grep { $_ =~ m#.+/.+# } @timezones; + + # Append 'local' to the list, which will use the timezone + # given by the server. + push(@timezones, 'local'); + push(@timezones, 'UTC'); + + return $self->{'legal_values'} = \@timezones; } 1; |