diff options
Diffstat (limited to 'Bugzilla/User/Setting/Skin.pm')
-rw-r--r-- | Bugzilla/User/Setting/Skin.pm | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Bugzilla/User/Setting/Skin.pm b/Bugzilla/User/Setting/Skin.pm index 7b0688c0c..0447b02ab 100644 --- a/Bugzilla/User/Setting/Skin.pm +++ b/Bugzilla/User/Setting/Skin.pm @@ -21,24 +21,26 @@ use File::Basename; use constant BUILTIN_SKIN_NAMES => ['standard']; 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 $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)}; + my $dirbase = bz_locations()->{'skinsdir'} . '/contrib'; - foreach my $direntry (glob(catdir($dirbase, '*'))) { - if (-d $direntry) { - next if basename($direntry) =~ /^cvs$/i; - # Stylesheet set found - push(@legal_values, basename($direntry)); - } + # 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) { + next if basename($direntry) =~ /^cvs$/i; + + # Stylesheet set found + push(@legal_values, basename($direntry)); } + } - return $self->{'legal_values'} = \@legal_values; + return $self->{'legal_values'} = \@legal_values; } 1; |