diff options
Diffstat (limited to 'extensions/GoogleAnalytics')
-rw-r--r-- | extensions/GoogleAnalytics/Extension.pm | 6 | ||||
-rw-r--r-- | extensions/GoogleAnalytics/lib/Config.pm | 41 |
2 files changed, 22 insertions, 25 deletions
diff --git a/extensions/GoogleAnalytics/Extension.pm b/extensions/GoogleAnalytics/Extension.pm index e9b144da4..fb7e8adae 100644 --- a/extensions/GoogleAnalytics/Extension.pm +++ b/extensions/GoogleAnalytics/Extension.pm @@ -15,9 +15,9 @@ use parent qw(Bugzilla::Extension); our $VERSION = '0.1'; sub config_add_panels { - my ($self, $args) = @_; - my $modules = $args->{panel_modules}; - $modules->{GoogleAnalytics} = "Bugzilla::Extension::GoogleAnalytics::Config"; + my ($self, $args) = @_; + my $modules = $args->{panel_modules}; + $modules->{GoogleAnalytics} = "Bugzilla::Extension::GoogleAnalytics::Config"; } __PACKAGE__->NAME; diff --git a/extensions/GoogleAnalytics/lib/Config.pm b/extensions/GoogleAnalytics/lib/Config.pm index f9e003ce0..1c453ff74 100644 --- a/extensions/GoogleAnalytics/lib/Config.pm +++ b/extensions/GoogleAnalytics/lib/Config.pm @@ -14,28 +14,25 @@ use warnings; use Bugzilla::Config::Common; sub get_param_list { - my ($class) = @_; - - my @params = ( - { - name => 'google_analytics_tracking_id', - type => 't', - default => '', - checker => sub { - my ($tracking_id) = (@_); - - return 'must be like UA-XXXXXX-X' unless $tracking_id =~ m{^(UA-[[:xdigit:]]+-[[:xdigit:]]+)?$}; - return ''; - } - }, - { - name => 'google_analytics_debug', - type => 'b', - default => 0 - }, - ); - - return @params; + my ($class) = @_; + + my @params = ( + { + name => 'google_analytics_tracking_id', + type => 't', + default => '', + checker => sub { + my ($tracking_id) = (@_); + + return 'must be like UA-XXXXXX-X' + unless $tracking_id =~ m{^(UA-[[:xdigit:]]+-[[:xdigit:]]+)?$}; + return ''; + } + }, + {name => 'google_analytics_debug', type => 'b', default => 0}, + ); + + return @params; } 1; |