]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1387459 - Tidy the Bugzilla/Config/*.pm modules
authorDylan William Hardison <dylan@hardison.net>
Fri, 4 Aug 2017 17:09:47 +0000 (13:09 -0400)
committerGitHub <noreply@github.com>
Fri, 4 Aug 2017 17:09:47 +0000 (13:09 -0400)
18 files changed:
Bugzilla/Config/Admin.pm
Bugzilla/Config/Advanced.pm
Bugzilla/Config/Attachment.pm
Bugzilla/Config/Auth.pm
Bugzilla/Config/BugChange.pm
Bugzilla/Config/BugFields.pm
Bugzilla/Config/Common.pm
Bugzilla/Config/Core.pm
Bugzilla/Config/DependencyGraph.pm
Bugzilla/Config/General.pm
Bugzilla/Config/GroupSecurity.pm
Bugzilla/Config/LDAP.pm
Bugzilla/Config/MTA.pm
Bugzilla/Config/PatchViewer.pm
Bugzilla/Config/Query.pm
Bugzilla/Config/RADIUS.pm
Bugzilla/Config/ShadowDB.pm
Bugzilla/Config/UserMatch.pm

index 5f10bfef34fa319c88f4d0818f7e3c68b0985fee..ad24f7112df7870b9827a6c6526d4e07cc19852f 100644 (file)
@@ -19,52 +19,53 @@ use Scalar::Util qw(looks_like_number);
 our $sortkey = 200;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'allowbugdeletion',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'allowemailchange',
-   type => 'b',
-   default => 1
-  },
-
-  {
-   name => 'allowuserdeletion',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'last_visit_keep_days',
-   type => 't',
-   default => 10,
-   checker => \&check_numeric
-  },
-
-  {
-    name => 'rate_limit_active',
-    type => 'b',
-    default => 1,
-  },
-
-  {
-    name => 'rate_limit_rules',
-    type => 'l',
-    default => '{"get_bug": [75, 60], "show_bug": [75, 60]}',
-    checker => \&check_rate_limit_rules,
-  },
-
-  {
-    name => 'log_user_requests',
-    type => 'b',
-    default => 0,
-  });
-  return @param_list;
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'allowbugdeletion',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'allowemailchange',
+            type    => 'b',
+            default => 1
+        },
+
+        {
+            name    => 'allowuserdeletion',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'last_visit_keep_days',
+            type    => 't',
+            default => 10,
+            checker => \&check_numeric
+        },
+
+        {
+            name    => 'rate_limit_active',
+            type    => 'b',
+            default => 1,
+        },
+
+        {
+            name    => 'rate_limit_rules',
+            type    => 'l',
+            default => '{"get_bug": [75, 60], "show_bug": [75, 60]}',
+            checker => \&check_rate_limit_rules,
+        },
+
+        {
+            name    => 'log_user_requests',
+            type    => 'b',
+            default => 0,
+        }
+    );
+    return @param_list;
 }
 
 sub check_rate_limit_rules {
index 4bf774ae06d600304b165bc93806b6dcb4681488..d7fdd34aacf42884d54b6393430880316a7bad7a 100644 (file)
@@ -16,82 +16,82 @@ use Bugzilla::Config::Common;
 our $sortkey = 1700;
 
 use constant get_param_list => (
-  {
-   name => 'cookiedomain',
-   type => 't',
-   default => ''
-  },
+    {
+        name    => 'cookiedomain',
+        type    => 't',
+        default => ''
+    },
 
-  {
-   name => 'inbound_proxies',
-   type => 't',
-   default => '',
-   checker => \&check_inbound_proxies
-  },
+    {
+        name    => 'inbound_proxies',
+        type    => 't',
+        default => '',
+        checker => \&check_inbound_proxies
+    },
 
-  {
-   name => 'proxy_url',
-   type => 't',
-   default => ''
-  },
+    {
+        name    => 'proxy_url',
+        type    => 't',
+        default => ''
+    },
 
-  {
-   name => 'strict_transport_security',
-   type => 's',
-   choices => ['off', 'this_domain_only', 'include_subdomains'],
-   default => 'off',
-   checker => \&check_multi
-  },
+    {
+        name    => 'strict_transport_security',
+        type    => 's',
+        choices => [ 'off', 'this_domain_only', 'include_subdomains' ],
+        default => 'off',
+        checker => \&check_multi
+    },
 
-  {
-   name => 'disable_bug_updates',
-   type => 'b',
-   default => 0
-  },
+    {
+        name    => 'disable_bug_updates',
+        type    => 'b',
+        default => 0
+    },
 
-  {
-   name => 'sentry_uri',
-   type => 't',
-   default => '',
-  },
+    {
+        name    => 'sentry_uri',
+        type    => 't',
+        default => '',
+    },
 
-  {
-   name => 'metrics_enabled',
-   type => 'b',
-   default => 0
-  },
-  {
-   name => 'metrics_user_ids',
-   type => 't',
-   default => '3881,5038,5898,13647,20209,251051,373476,409787'
-  },
-  {
-   name => 'metrics_elasticsearch_server',
-   type => 't',
-   default => '127.0.0.1:9200'
-  },
-  {
-   name => 'metrics_elasticsearch_index',
-   type => 't',
-   default => 'bmo-metrics'
-  },
-  {
-   name => 'metrics_elasticsearch_type',
-   type => 't',
-   default => 'timings'
-  },
-  {
-   name => 'metrics_elasticsearch_ttl',
-   type => 't',
-   default => '1210000000' # 14 days
-  },
+    {
+        name    => 'metrics_enabled',
+        type    => 'b',
+        default => 0
+    },
+    {
+        name    => 'metrics_user_ids',
+        type    => 't',
+        default => '3881,5038,5898,13647,20209,251051,373476,409787'
+    },
+    {
+        name    => 'metrics_elasticsearch_server',
+        type    => 't',
+        default => '127.0.0.1:9200'
+    },
+    {
+        name    => 'metrics_elasticsearch_index',
+        type    => 't',
+        default => 'bmo-metrics'
+    },
+    {
+        name    => 'metrics_elasticsearch_type',
+        type    => 't',
+        default => 'timings'
+    },
+    {
+        name    => 'metrics_elasticsearch_ttl',
+        type    => 't',
+        default => '1210000000'                   # 14 days
+    },
 );
 
 sub check_inbound_proxies {
     my $inbound_proxies = shift;
 
     return "" if $inbound_proxies eq "*";
-    my @proxies = split(/[\s,]+/, $inbound_proxies);
+    my @proxies = split( /[\s,]+/, $inbound_proxies );
     foreach my $proxy (@proxies) {
         validate_ip($proxy) || return "$proxy is not a valid IPv4 or IPv6 address";
     }
index b81d21e53319ca87f5bc8b888719f9f673d5f395..bc2f4502992a9270bcd27aa5fa4e94d474dddfc0 100644 (file)
@@ -16,7 +16,7 @@ use Bugzilla::Config::Common;
 our $sortkey = 400;
 
 sub get_param_list {
-    my $class = shift;
+    my $class      = shift;
     my @param_list = (
         {
             name    => 'allow_attachment_display',
@@ -43,7 +43,7 @@ sub get_param_list {
         {
             name    => 'attachment_storage',
             type    => 's',
-            choices => ['database', 'filesystem', 's3'],
+            choices => [ 'database', 'filesystem', 's3' ],
             default => 'database',
             checker => \&check_storage
         },
@@ -67,24 +67,25 @@ sub get_param_list {
 }
 
 sub check_params {
-    my ($class, $params) = @_;
+    my ( $class, $params ) = @_;
     return unless $params->{attachment_storage} eq 's3';
 
-    if ($params->{s3_bucket} eq ''
+    if (   $params->{s3_bucket} eq ''
         || $params->{aws_access_key_id} eq ''
-        || $params->{aws_secret_access_key} eq ''
-    ) {
-        return "You must set s3_bucket, aws_access_key_id, and aws_secret_access_key when attachment_storage is set to S3";
+        || $params->{aws_secret_access_key} eq '' )
+    {
+        return
+            "You must set s3_bucket, aws_access_key_id, and aws_secret_access_key when attachment_storage is set to S3";
     }
     return '';
 }
 
 sub check_storage {
-    my ($value, $param) = (@_);
-    my $check_multi = check_multi($value, $param);
+    my ( $value, $param ) = (@_);
+    my $check_multi = check_multi( $value, $param );
     return $check_multi if $check_multi;
 
-    if ($value eq 's3') {
+    if ( $value eq 's3' ) {
         return Bugzilla->feature('s3')
             ? ''
             : 'The perl modules required for S3 support are not installed';
index 9e1f89ef9c830371ef40e184a711fbf454dc4fd4..dddedd81993b4862d635a2a9f16b8351cf8810a2 100644 (file)
@@ -16,138 +16,137 @@ use Bugzilla::Config::Common;
 our $sortkey = 300;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'auth_env_id',
-   type    => 't',
-   default => '',
-  },
-
-  {
-   name    => 'auth_env_email',
-   type    => 't',
-   default => '',
-  },
-
-  {
-   name    => 'auth_env_realname',
-   type    => 't',
-   default => '',
-  },
-
-  # XXX in the future:
-  #
-  # user_verify_class and user_info_class should have choices gathered from
-  # whatever sits in their respective directories
-  #
-  # rather than comma-separated lists, these two should eventually become
-  # arrays, but that requires alterations to editparams first
-
-  {
-   name => 'user_info_class',
-   type => 's',
-   choices => [ 'CGI', 'Env', 'Env,CGI' ],
-   default => 'CGI',
-   checker => \&check_multi
-  },
-
-  {
-   name => 'user_verify_class',
-   type => 'o',
-   choices => [ 'DB', 'RADIUS', 'LDAP' ],
-   default => 'DB',
-   checker => \&check_user_verify_class
-  },
-
-  {
-   name => 'rememberlogin',
-   type => 's',
-   choices => ['on', 'defaulton', 'defaultoff', 'off'],
-   default => 'on',
-   checker => \&check_multi
-  },
-
-  {
-   name => 'requirelogin',
-   type => 'b',
-   default => '0'
-  },
-
-  {
-   name => 'webservice_email_filter',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'emailregexp',
-   type => 't',
-   default => q:^[\\w\\.\\+\\-=]+@[\\w\\.\\-]+\\.[\\w\\-]+$:,
-   checker => \&check_regexp
-  },
-
-  {
-   name => 'emailregexpdesc',
-   type => 'l',
-   default => 'A legal address must contain exactly one \'@\', and at least ' .
-              'one \'.\' after the @.'
-  },
-
-  {
-   name => 'emailsuffix',
-   type => 't',
-   default => ''
-  },
-
-  {
-   name => 'createemailregexp',
-   type => 't',
-   default => q:.*:,
-   checker => \&check_regexp
-  },
-
-  {
-   name => 'password_complexity',
-   type => 's',
-   choices => [ 'no_constraints', 'bmo' ],
-   default => 'no_constraints',
-   checker => \&check_multi
-  },
-
-  {
-   name => 'password_check_on_login',
-   type => 'b',
-   default => '1'
-  },
-  {
-   name => 'auth_delegation',
-   type => 'b',
-   default => 0,
-  },
-
-  {
-   name => 'duo_host',
-   type => 't',
-   default => '',
-  },
-  {
-   name => 'duo_akey',
-   type => 't',
-   default => '',
-  },
-  {
-   name => 'duo_ikey',
-   type => 't',
-   default => '',
-  },
-  {
-   name => 'duo_skey',
-   type => 't',
-   default => '',
-  },
-  );
-  return @param_list;
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'auth_env_id',
+            type    => 't',
+            default => '',
+        },
+
+        {
+            name    => 'auth_env_email',
+            type    => 't',
+            default => '',
+        },
+
+        {
+            name    => 'auth_env_realname',
+            type    => 't',
+            default => '',
+        },
+
+        # XXX in the future:
+        #
+        # user_verify_class and user_info_class should have choices gathered from
+        # whatever sits in their respective directories
+        #
+        # rather than comma-separated lists, these two should eventually become
+        # arrays, but that requires alterations to editparams first
+
+        {
+            name    => 'user_info_class',
+            type    => 's',
+            choices => [ 'CGI', 'Env', 'Env,CGI' ],
+            default => 'CGI',
+            checker => \&check_multi
+        },
+
+        {
+            name    => 'user_verify_class',
+            type    => 'o',
+            choices => [ 'DB', 'RADIUS', 'LDAP' ],
+            default => 'DB',
+            checker => \&check_user_verify_class
+        },
+
+        {
+            name    => 'rememberlogin',
+            type    => 's',
+            choices => [ 'on', 'defaulton', 'defaultoff', 'off' ],
+            default => 'on',
+            checker => \&check_multi
+        },
+
+        {
+            name    => 'requirelogin',
+            type    => 'b',
+            default => '0'
+        },
+
+        {
+            name    => 'webservice_email_filter',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'emailregexp',
+            type    => 't',
+            default => q:^[\\w\\.\\+\\-=]+@[\\w\\.\\-]+\\.[\\w\\-]+$:,
+            checker => \&check_regexp
+        },
+
+        {
+            name    => 'emailregexpdesc',
+            type    => 'l',
+            default => 'A legal address must contain exactly one \'@\', and at least ' . 'one \'.\' after the @.'
+        },
+
+        {
+            name    => 'emailsuffix',
+            type    => 't',
+            default => ''
+        },
+
+        {
+            name    => 'createemailregexp',
+            type    => 't',
+            default => q:.*:,
+            checker => \&check_regexp
+        },
+
+        {
+            name    => 'password_complexity',
+            type    => 's',
+            choices => [ 'no_constraints', 'bmo' ],
+            default => 'no_constraints',
+            checker => \&check_multi
+        },
+
+        {
+            name    => 'password_check_on_login',
+            type    => 'b',
+            default => '1'
+        },
+        {
+            name    => 'auth_delegation',
+            type    => 'b',
+            default => 0,
+        },
+
+        {
+            name    => 'duo_host',
+            type    => 't',
+            default => '',
+        },
+        {
+            name    => 'duo_akey',
+            type    => 't',
+            default => '',
+        },
+        {
+            name    => 'duo_ikey',
+            type    => 't',
+            default => '',
+        },
+        {
+            name    => 'duo_skey',
+            type    => 't',
+            default => '',
+        },
+    );
+    return @param_list;
 }
 
 1;
index 0acdc0ce49cfdb2f8a04e23e279261e50278081a..f9c33512a5776f623bc2d9d86d0100308f762c53 100644 (file)
@@ -17,65 +17,67 @@ use Bugzilla::Status;
 our $sortkey = 500;
 
 sub get_param_list {
-  my $class = shift;
-
-  # Hardcoded bug statuses which existed before Bugzilla 3.1.
-  my @closed_bug_statuses = ('RESOLVED', 'VERIFIED', 'CLOSED');
-
-  # If we are upgrading from 3.0 or older, bug statuses are not customisable
-  # and bug_status.is_open is not yet defined (hence the eval), so we use
-  # the bug statuses above as they are still hardcoded.
-  eval {
-      my @current_closed_states = map {$_->name} closed_bug_statuses();
-      # If no closed state was found, use the default list above.
-      @closed_bug_statuses = @current_closed_states if scalar(@current_closed_states);
-  };
-
-  my @param_list = (
-  {
-   name => 'duplicate_or_move_bug_status',
-   type => 's',
-   choices => \@closed_bug_statuses,
-   default => $closed_bug_statuses[0],
-   checker => \&check_bug_status
-  },
-
-  {
-   name => 'letsubmitterchoosepriority',
-   type => 'b',
-   default => 1
-  },
-
-  {
-   name => 'letsubmitterchoosemilestone',
-   type => 'b',
-   default => 1
-  },
-
-  {
-   name => 'musthavemilestoneonaccept',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'commentonchange_resolution',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'commentonduplicate',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name    => 'noresolveonopenblockers',
-   type    => 'b',
-   default => 0,
-  } );
-  return @param_list;
+    my $class = shift;
+
+    # Hardcoded bug statuses which existed before Bugzilla 3.1.
+    my @closed_bug_statuses = ( 'RESOLVED', 'VERIFIED', 'CLOSED' );
+
+    # If we are upgrading from 3.0 or older, bug statuses are not customisable
+    # and bug_status.is_open is not yet defined (hence the eval), so we use
+    # the bug statuses above as they are still hardcoded.
+    eval {
+        my @current_closed_states = map { $_->name } closed_bug_statuses();
+
+        # If no closed state was found, use the default list above.
+        @closed_bug_statuses = @current_closed_states if scalar(@current_closed_states);
+    };
+
+    my @param_list = (
+        {
+            name    => 'duplicate_or_move_bug_status',
+            type    => 's',
+            choices => \@closed_bug_statuses,
+            default => $closed_bug_statuses[0],
+            checker => \&check_bug_status
+        },
+
+        {
+            name    => 'letsubmitterchoosepriority',
+            type    => 'b',
+            default => 1
+        },
+
+        {
+            name    => 'letsubmitterchoosemilestone',
+            type    => 'b',
+            default => 1
+        },
+
+        {
+            name    => 'musthavemilestoneonaccept',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'commentonchange_resolution',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'commentonduplicate',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'noresolveonopenblockers',
+            type    => 'b',
+            default => 0,
+        }
+    );
+    return @param_list;
 }
 
 1;
index 0111ac6a8fd99f83c7a30e536bdc69fa45926ec8..94a16b7c2bb984f893853242d5461868a49e4ebe 100644 (file)
@@ -17,88 +17,89 @@ use Bugzilla::Field;
 our $sortkey = 600;
 
 sub get_param_list {
-  my $class = shift;
-
-  my @legal_priorities = @{get_legal_field_values('priority')};
-  my @legal_severities = @{get_legal_field_values('bug_severity')};
-  my @legal_platforms  = @{get_legal_field_values('rep_platform')};
-  my @legal_OS         = @{get_legal_field_values('op_sys')};
-
-  my @param_list = (
-  {
-   name => 'useclassification',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'usetargetmilestone',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'useqacontact',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'usestatuswhiteboard',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'usebugaliases',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'use_see_also',
-   type => 'b',
-   default => 1
-  },
-
-  {
-   name => 'defaultpriority',
-   type => 's',
-   choices => \@legal_priorities,
-   default => $legal_priorities[-1],
-   checker => \&check_priority
-  },
-
-  {
-   name => 'defaultseverity',
-   type => 's',
-   choices => \@legal_severities,
-   default => $legal_severities[-1],
-   checker => \&check_severity
-  },
-
-  {
-   name => 'defaultplatform',
-   type => 's',
-   choices => ['', @legal_platforms],
-   default => '',
-   checker => \&check_platform
-  },
-
-  {
-   name => 'defaultopsys',
-   type => 's',
-   choices => ['', @legal_OS],
-   default => '',
-   checker => \&check_opsys
-  },
-
-  {
-   name => 'collapsed_comment_tags',
-   type => 't',
-   default => 'obsolete, spam',
-  });
-  return @param_list;
+    my $class = shift;
+
+    my @legal_priorities = @{ get_legal_field_values('priority') };
+    my @legal_severities = @{ get_legal_field_values('bug_severity') };
+    my @legal_platforms  = @{ get_legal_field_values('rep_platform') };
+    my @legal_OS         = @{ get_legal_field_values('op_sys') };
+
+    my @param_list = (
+        {
+            name    => 'useclassification',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'usetargetmilestone',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'useqacontact',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'usestatuswhiteboard',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'usebugaliases',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'use_see_also',
+            type    => 'b',
+            default => 1
+        },
+
+        {
+            name    => 'defaultpriority',
+            type    => 's',
+            choices => \@legal_priorities,
+            default => $legal_priorities[-1],
+            checker => \&check_priority
+        },
+
+        {
+            name    => 'defaultseverity',
+            type    => 's',
+            choices => \@legal_severities,
+            default => $legal_severities[-1],
+            checker => \&check_severity
+        },
+
+        {
+            name    => 'defaultplatform',
+            type    => 's',
+            choices => [ '', @legal_platforms ],
+            default => '',
+            checker => \&check_platform
+        },
+
+        {
+            name    => 'defaultopsys',
+            type    => 's',
+            choices => [ '', @legal_OS ],
+            default => '',
+            checker => \&check_opsys
+        },
+
+        {
+            name    => 'collapsed_comment_tags',
+            type    => 't',
+            default => 'obsolete, spam',
+        }
+    );
+    return @param_list;
 }
 
 1;
index 897b4e2ebfe7144a584bc703ec03086f3fb224bf..cbb030a9cb3418b2924761de23d3d199f3abd550 100644 (file)
@@ -21,32 +21,32 @@ use Bugzilla::Group;
 use Bugzilla::Status;
 
 use base qw(Exporter);
-@Bugzilla::Config::Common::EXPORT =
-    qw(check_multi check_numeric check_regexp check_url check_group
-       check_sslbase check_priority check_severity check_platform
-       check_opsys check_shadowdb check_urlbase check_webdotbase
-       check_user_verify_class
-       check_mail_delivery_method check_notification check_utf8
-       check_bug_status check_smtp_auth check_theschwartz_available
-       check_maxattachmentsize check_email
-       check_comment_taggers_group
+@Bugzilla::Config::Common::EXPORT = qw(
+    check_multi check_numeric check_regexp check_url check_group
+    check_sslbase check_priority check_severity check_platform
+    check_opsys check_shadowdb check_urlbase check_webdotbase
+    check_user_verify_class
+    check_mail_delivery_method check_notification check_utf8
+    check_bug_status check_smtp_auth check_theschwartz_available
+    check_maxattachmentsize check_email
+    check_comment_taggers_group
 );
 
 # Checking functions for the various values
 
 sub check_multi {
-    my ($value, $param) = (@_);
+    my ( $value, $param ) = (@_);
 
-    if ($param->{'type'} eq "s") {
-        unless (scalar(grep {$_ eq $value} (@{$param->{'choices'}}))) {
+    if ( $param->{'type'} eq "s" ) {
+        unless ( scalar( grep { $_ eq $value } ( @{ $param->{'choices'} } ) ) ) {
             return "Invalid choice '$value' for single-select list param '$param->{'name'}'";
         }
 
         return "";
     }
-    elsif ($param->{'type'} eq 'm' || $param->{'type'} eq 'o') {
-        foreach my $chkParam (split(',', $value)) {
-            unless (scalar(grep {$_ eq $chkParam} (@{$param->{'choices'}}))) {
+    elsif ( $param->{'type'} eq 'm' || $param->{'type'} eq 'o' ) {
+        foreach my $chkParam ( split( ',', $value ) ) {
+            unless ( scalar( grep { $_ eq $chkParam } ( @{ $param->{'choices'} } ) ) ) {
                 return "Invalid choice '$chkParam' for multi-select list param '$param->{'name'}'";
             }
         }
@@ -54,14 +54,13 @@ sub check_multi {
         return "";
     }
     else {
-        return "Invalid param type '$param->{'type'}' for check_multi(); " .
-          "contact your Bugzilla administrator";
+        return "Invalid param type '$param->{'type'}' for check_multi(); " . "contact your Bugzilla administrator";
     }
 }
 
 sub check_numeric {
     my ($value) = (@_);
-    if ($value !~ /^[0-9]+$/) {
+    if ( $value !~ /^[0-9]+$/ ) {
         return "must be a numeric value";
     }
     return "";
@@ -69,13 +68,13 @@ sub check_numeric {
 
 sub check_regexp {
     my ($value) = (@_);
-    eval { qr/$value/ };
+    eval {qr/$value/};
     return $@;
 }
 
 sub check_email {
     my ($value) = @_;
-    if ($value !~ $Email::Address::mailbox) {
+    if ( $value !~ $Email::Address::mailbox ) {
         return "must be a valid email address.";
     }
     return "";
@@ -83,23 +82,24 @@ sub check_email {
 
 sub check_sslbase {
     my $url = shift;
-    if ($url ne '') {
-        if ($url !~ m#^https://([^/]+).*/$#) {
+    if ( $url ne '' ) {
+        if ( $url !~ m#^https://([^/]+).*/$# ) {
             return "must be a legal URL, that starts with https and ends with a slash.";
         }
         my $host = $1;
+
         # Fall back to port 443 if for some reason getservbyname() fails.
-        my $port = getservbyname('https', 'tcp') || 443;
-        if ($host =~ /^(.+):(\d+)$/) {
+        my $port = getservbyname( 'https', 'tcp' ) || 443;
+        if ( $host =~ /^(.+):(\d+)$/ ) {
             $host = $1;
             $port = $2;
         }
         local *SOCK;
         my $proto = getprotobyname('tcp');
-        socket(SOCK, PF_INET, SOCK_STREAM, $proto);
+        socket( SOCK, PF_INET, SOCK_STREAM, $proto );
         my $iaddr = inet_aton($host) || return "The host $host cannot be resolved";
-        my $sin = sockaddr_in($port, $iaddr);
-        if (!connect(SOCK, $sin)) {
+        my $sin = sockaddr_in( $port, $iaddr );
+        if ( !connect( SOCK, $sin ) ) {
             return "Failed to connect to $host:$port; unable to enable SSL";
         }
         close(SOCK);
@@ -109,12 +109,12 @@ sub check_sslbase {
 
 sub check_utf8 {
     my $utf8 = shift;
+
     # You cannot turn off the UTF-8 parameter if you've already converted
     # your tables to utf-8.
     my $dbh = Bugzilla->dbh;
-    if ($dbh->isa('Bugzilla::DB::Mysql') && $dbh->bz_db_is_utf8 && !$utf8) {
-        return "You cannot disable UTF-8 support, because your MySQL database"
-               . " is encoded in UTF-8";
+    if ( $dbh->isa('Bugzilla::DB::Mysql') && $dbh->bz_db_is_utf8 && !$utf8 ) {
+        return "You cannot disable UTF-8 support, because your MySQL database" . " is encoded in UTF-8";
     }
     return "";
 }
@@ -122,9 +122,8 @@ sub check_utf8 {
 sub check_priority {
     my ($value) = (@_);
     my $legal_priorities = get_legal_field_values('priority');
-    if (!grep($_ eq $value, @$legal_priorities)) {
-        return "Must be a legal priority value: one of " .
-            join(", ", @$legal_priorities);
+    if ( !grep( $_ eq $value, @$legal_priorities ) ) {
+        return "Must be a legal priority value: one of " . join( ", ", @$legal_priorities );
     }
     return "";
 }
@@ -132,9 +131,8 @@ sub check_priority {
 sub check_severity {
     my ($value) = (@_);
     my $legal_severities = get_legal_field_values('bug_severity');
-    if (!grep($_ eq $value, @$legal_severities)) {
-        return "Must be a legal severity value: one of " .
-            join(", ", @$legal_severities);
+    if ( !grep( $_ eq $value, @$legal_severities ) ) {
+        return "Must be a legal severity value: one of " . join( ", ", @$legal_severities );
     }
     return "";
 }
@@ -142,9 +140,8 @@ sub check_severity {
 sub check_platform {
     my ($value) = (@_);
     my $legal_platforms = get_legal_field_values('rep_platform');
-    if (!grep($_ eq $value, '', @$legal_platforms)) {
-        return "Must be empty or a legal platform value: one of " .
-            join(", ", @$legal_platforms);
+    if ( !grep( $_ eq $value, '', @$legal_platforms ) ) {
+        return "Must be empty or a legal platform value: one of " . join( ", ", @$legal_platforms );
     }
     return "";
 }
@@ -152,18 +149,17 @@ sub check_platform {
 sub check_opsys {
     my ($value) = (@_);
     my $legal_OS = get_legal_field_values('op_sys');
-    if (!grep($_ eq $value, '', @$legal_OS)) {
-        return "Must be empty or a legal operating system value: one of " .
-            join(", ", @$legal_OS);
+    if ( !grep( $_ eq $value, '', @$legal_OS ) ) {
+        return "Must be empty or a legal operating system value: one of " . join( ", ", @$legal_OS );
     }
     return "";
 }
 
 sub check_bug_status {
     my $bug_status = shift;
-    my @closed_bug_statuses = map {$_->name} closed_bug_statuses();
-    if (!grep($_ eq $bug_status, @closed_bug_statuses)) {
-        return "Must be a valid closed status: one of " . join(', ', @closed_bug_statuses);
+    my @closed_bug_statuses = map { $_->name } closed_bug_statuses();
+    if ( !grep( $_ eq $bug_status, @closed_bug_statuses ) ) {
+        return "Must be a valid closed status: one of " . join( ', ', @closed_bug_statuses );
     }
     return "";
 }
@@ -171,8 +167,8 @@ sub check_bug_status {
 sub check_group {
     my $group_name = shift;
     return "" unless $group_name;
-    my $group = new Bugzilla::Group({'name' => $group_name});
-    unless (defined $group) {
+    my $group = new Bugzilla::Group( { 'name' => $group_name } );
+    unless ( defined $group ) {
         return "Must be an existing group name";
     }
     return "";
@@ -181,11 +177,11 @@ sub check_group {
 sub check_shadowdb {
     my ($value) = (@_);
     $value = trim($value);
-    if ($value eq "") {
+    if ( $value eq "" ) {
         return "";
     }
 
-    if (!Bugzilla->params->{'shadowdbhost'}) {
+    if ( !Bugzilla->params->{'shadowdbhost'} ) {
         return "You need to specify a host when using a shadow database";
     }
 
@@ -197,7 +193,7 @@ sub check_shadowdb {
 
 sub check_urlbase {
     my ($url) = (@_);
-    if ($url && $url !~ m:^http.*/$:) {
+    if ( $url && $url !~ m:^http.*/$: ) {
         return "must be a legal URL, that starts with http and ends with a slash.";
     }
     return "";
@@ -205,8 +201,8 @@ sub check_urlbase {
 
 sub check_url {
     my ($url) = (@_);
-    return '' if $url eq ''; # Allow empty URLs
-    if ($url !~ m:/$:) {
+    return '' if $url eq '';    # Allow empty URLs
+    if ( $url !~ m:/$: ) {
         return 'must be a legal URL, absolute or relative, ending with a slash.';
     }
     return '';
@@ -215,19 +211,22 @@ sub check_url {
 sub check_webdotbase {
     my ($value) = (@_);
     $value = trim($value);
-    if ($value eq "") {
+    if ( $value eq "" ) {
         return "";
     }
-    if($value !~ /^https?:/) {
-        if(! -x $value) {
-            return "The file path \"$value\" is not a valid executable.  Please specify the complete file path to 'dot' if you intend to generate graphs locally.";
+    if ( $value !~ /^https?:/ ) {
+        if ( !-x $value ) {
+            return
+                "The file path \"$value\" is not a valid executable.  Please specify the complete file path to 'dot' if you intend to generate graphs locally.";
         }
+
         # Check .htaccess allows access to generated images
         my $webdotdir = bz_locations()->{'webdotdir'};
-        if(-e "$webdotdir/.htaccess") {
+        if ( -e "$webdotdir/.htaccess" ) {
             open HTACCESS, "<", "$webdotdir/.htaccess";
-            if(! grep(/ \\\.png\$/,<HTACCESS>)) {
-                return "Dependency graph images are not accessible.\nAssuming that you have not modified the file, delete $webdotdir/.htaccess and re-run checksetup.pl to rectify.\n";
+            if ( !grep( / \\\.png\$/, <HTACCESS> ) ) {
+                return
+                    "Dependency graph images are not accessible.\nAssuming that you have not modified the file, delete $webdotdir/.htaccess and re-run checksetup.pl to rectify.\n";
             }
             close HTACCESS;
         }
@@ -236,6 +235,7 @@ sub check_webdotbase {
 }
 
 sub check_user_verify_class {
+
     # doeditparams traverses the list of params, and for each one it checks,
     # then updates. This means that if one param checker wants to look at
     # other params, it must be below that other one. So you can't have two
@@ -245,24 +245,22 @@ sub check_user_verify_class {
     # So don't do that.
 
     my $params = Bugzilla->params;
-    my ($list, $entry) = @_;
+    my ( $list, $entry ) = @_;
     $list || return 'You need to specify at least one authentication mechanism';
-    for my $class (split /,\s*/, $list) {
-        my $res = check_multi($class, $entry);
+    for my $class ( split /,\s*/, $list ) {
+        my $res = check_multi( $class, $entry );
         return $res if $res;
-        if ($class eq 'RADIUS') {
-            if (!Bugzilla->feature('auth_radius')) {
-                return "RADIUS support is not available. Run checksetup.pl"
-                       . " for more details";
+        if ( $class eq 'RADIUS' ) {
+            if ( !Bugzilla->feature('auth_radius') ) {
+                return "RADIUS support is not available. Run checksetup.pl" . " for more details";
             }
             return "RADIUS servername (RADIUS_server) is missing"
                 if !$params->{"RADIUS_server"};
             return "RADIUS_secret is empty" if !$params->{"RADIUS_secret"};
         }
-        elsif ($class eq 'LDAP') {
-            if (!Bugzilla->feature('auth_ldap')) {
-                return "LDAP support is not available. Run checksetup.pl"
-                       . " for more details";
+        elsif ( $class eq 'LDAP' ) {
+            if ( !Bugzilla->feature('auth_ldap') ) {
+                return "LDAP support is not available. Run checksetup.pl" . " for more details";
             }
             return "LDAP servername (LDAPserver) is missing"
                 if !$params->{"LDAPserver"};
@@ -276,7 +274,8 @@ sub check_mail_delivery_method {
     my $check = check_multi(@_);
     return $check if $check;
     my $mailer = shift;
-    if ($mailer eq 'sendmail' and ON_WINDOWS) {
+    if ( $mailer eq 'sendmail' and ON_WINDOWS ) {
+
         # look for sendmail.exe
         return "Failed to locate " . SENDMAIL_EXE
             unless -e SENDMAIL_EXE;
@@ -288,59 +287,59 @@ sub check_maxattachmentsize {
     my $check = check_numeric(@_);
     return $check if $check;
     my $size = shift;
-    my $dbh = Bugzilla->dbh;
-    if ($dbh->isa('Bugzilla::DB::Mysql')) {
-        my (undef, $max_packet) = $dbh->selectrow_array(
-            q{SHOW VARIABLES LIKE 'max\_allowed\_packet'});
+    my $dbh  = Bugzilla->dbh;
+    if ( $dbh->isa('Bugzilla::DB::Mysql') ) {
+        my ( undef, $max_packet ) = $dbh->selectrow_array(q{SHOW VARIABLES LIKE 'max\_allowed\_packet'});
         my $byte_size = $size * 1024;
-        if ($max_packet < $byte_size) {
-            return "You asked for a maxattachmentsize of $byte_size bytes,"
-                   . " but the max_allowed_packet setting in MySQL currently"
-                   . " only allows packets up to $max_packet bytes";
+        if ( $max_packet < $byte_size ) {
+            return
+                  "You asked for a maxattachmentsize of $byte_size bytes,"
+                . " but the max_allowed_packet setting in MySQL currently"
+                . " only allows packets up to $max_packet bytes";
         }
     }
     return "";
 }
 
 sub check_notification {
-    my $option = shift;
-    my @current_version =
-        (BUGZILLA_VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/);
-    if ($current_version[1] % 2 && $option eq 'stable_branch_release') {
-        return "You are currently running a development snapshot, and so your " .
-               "installation is not based on a branch. If you want to be notified " .
-               "about the next stable release, you should select " .
-               "'latest_stable_release' instead";
+    my $option          = shift;
+    my @current_version = ( BUGZILLA_VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/ );
+    if ( $current_version[1] % 2 && $option eq 'stable_branch_release' ) {
+        return
+              "You are currently running a development snapshot, and so your "
+            . "installation is not based on a branch. If you want to be notified "
+            . "about the next stable release, you should select "
+            . "'latest_stable_release' instead";
     }
-    if ($option ne 'disabled' && !Bugzilla->feature('updates')) {
-        return "Some Perl modules are missing to get notifications about " .
-               "new releases. See the output of checksetup.pl for more information";
+    if ( $option ne 'disabled' && !Bugzilla->feature('updates') ) {
+        return "Some Perl modules are missing to get notifications about "
+            . "new releases. See the output of checksetup.pl for more information";
     }
     return "";
 }
 
 sub check_smtp_auth {
     my $username = shift;
-    if ($username and !Bugzilla->feature('smtp_auth')) {
-        return "SMTP Authentication is not available. Run checksetup.pl for"
-               . " more details";
+    if ( $username and !Bugzilla->feature('smtp_auth') ) {
+        return "SMTP Authentication is not available. Run checksetup.pl for" . " more details";
     }
     return "";
 }
 
 sub check_theschwartz_available {
     my $use_queue = shift;
-    if ($use_queue && !Bugzilla->feature('jobqueue')) {
-        return "Using the job queue requires that you have certain Perl"
-               . " modules installed. See the output of checksetup.pl"
-               . " for more information";
+    if ( $use_queue && !Bugzilla->feature('jobqueue') ) {
+        return
+              "Using the job queue requires that you have certain Perl"
+            . " modules installed. See the output of checksetup.pl"
+            . " for more information";
     }
     return "";
 }
 
 sub check_comment_taggers_group {
     my $group_name = shift;
-    if ($group_name && !Bugzilla->feature('jsonrpc')) {
+    if ( $group_name && !Bugzilla->feature('jsonrpc') ) {
         return "Comment tagging requires installation of the JSONRPC feature";
     }
     return check_group($group_name);
index 654e569ba1b30583fa37c661b04de1b771e8b32f..b3848a16e5807f9e0ced70a22edef63dac19e2c9 100644 (file)
@@ -16,31 +16,31 @@ use Bugzilla::Config::Common;
 our $sortkey = 100;
 
 use constant get_param_list => (
-  {
-   name => 'urlbase',
-   type => 't',
-   default => '',
-   checker => \&check_urlbase
-  },
-
-  {
-   name => 'ssl_redirect',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'sslbase',
-   type => 't',
-   default => '',
-   checker => \&check_sslbase
-  },
-
-  {
-   name => 'cookiepath',
-   type => 't',
-   default => '/'
-  },
+    {
+        name    => 'urlbase',
+        type    => 't',
+        default => '',
+        checker => \&check_urlbase
+    },
+
+    {
+        name    => 'ssl_redirect',
+        type    => 'b',
+        default => 0
+    },
+
+    {
+        name    => 'sslbase',
+        type    => 't',
+        default => '',
+        checker => \&check_sslbase
+    },
+
+    {
+        name    => 'cookiepath',
+        type    => 't',
+        default => '/'
+    },
 );
 
 1;
index f9f3c0af5ecbab21d565713b1a7e325cea0f5249..965be803a0b7a72ff8765a8562e945156005eb38 100644 (file)
@@ -40,15 +40,16 @@ use Bugzilla::Config::Common;
 our $sortkey = 800;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'webdotbase',
-   type => 't',
-   default => 'http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%',
-   checker => \&check_webdotbase
-  } );
-  return @param_list;
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'webdotbase',
+            type    => 't',
+            default => 'http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%',
+            checker => \&check_webdotbase
+        }
+    );
+    return @param_list;
 }
 
 1;
index 5efaa6f6c2a9a6571e5279f6e6cf18cabb54a43f..9d85aecaf327d16a03684fd853f5091aef6d8a7f 100644 (file)
@@ -16,48 +16,47 @@ use Bugzilla::Config::Common;
 our $sortkey = 150;
 
 use constant get_param_list => (
-  {
-   name => 'maintainer',
-   type => 't',
-   no_reset => '1',
-   default => '',
-   checker => \&check_email
-  },
-
-  {
-   name => 'docs_urlbase',
-   type => 't',
-   default => 'docs/%lang%/html/',
-   checker => \&check_url
-  },
-
-  {
-   name => 'utf8',
-   type => 'b',
-   default => '0',
-   checker => \&check_utf8
-  },
-
-  {
-   name => 'shutdownhtml',
-   type => 'l',
-   default => ''
-  },
-
-  {
-   name => 'announcehtml',
-   type => 'l',
-   default => ''
-  },
-
-  {
-   name => 'upgrade_notification',
-   type => 's',
-   choices => ['development_snapshot', 'latest_stable_release',
-               'stable_branch_release', 'disabled'],
-   default => 'latest_stable_release',
-   checker => \&check_notification
-  },
+    {
+        name     => 'maintainer',
+        type     => 't',
+        no_reset => '1',
+        default  => '',
+        checker  => \&check_email
+    },
+
+    {
+        name    => 'docs_urlbase',
+        type    => 't',
+        default => 'docs/%lang%/html/',
+        checker => \&check_url
+    },
+
+    {
+        name    => 'utf8',
+        type    => 'b',
+        default => '0',
+        checker => \&check_utf8
+    },
+
+    {
+        name    => 'shutdownhtml',
+        type    => 'l',
+        default => ''
+    },
+
+    {
+        name    => 'announcehtml',
+        type    => 'l',
+        default => ''
+    },
+
+    {
+        name    => 'upgrade_notification',
+        type    => 's',
+        choices => [ 'development_snapshot', 'latest_stable_release', 'stable_branch_release', 'disabled' ],
+        default => 'latest_stable_release',
+        checker => \&check_notification
+    },
 );
 
 1;
index 016bc82f7d0147f949bf664300103a89091bccb3..c9d6421d32083dad9cce2d6898f669108711548e 100644 (file)
@@ -17,80 +17,81 @@ use Bugzilla::Group;
 our $sortkey = 900;
 
 sub get_param_list {
-  my $class = shift;
-
-  my @param_list = (
-  {
-   name => 'makeproductgroups',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'chartgroup',
-   type => 's',
-   choices => \&_get_all_group_names,
-   default => 'editbugs',
-   checker => \&check_group
-  },
-
-  {
-   name => 'insidergroup',
-   type => 's',
-   choices => \&_get_all_group_names,
-   default => '',
-   checker => \&check_group
-  },
-
-  {
-   name => 'timetrackinggroup',
-   type => 's',
-   choices => \&_get_all_group_names,
-   default => 'editbugs',
-   checker => \&check_group
-  },
-
-  {
-   name => 'querysharegroup',
-   type => 's',
-   choices => \&_get_all_group_names,
-   default => 'editbugs',
-   checker => \&check_group
-  },
-
-  {
-   name => 'comment_taggers_group',
-   type => 's',
-   choices => \&_get_all_group_names,
-   default => 'editbugs',
-   checker => \&check_comment_taggers_group
-  },
-
-  {
-   name => 'debug_group',
-   type => 's',
-   choices => \&_get_all_group_names,
-   default => 'admin',
-   checker => \&check_group
-  },
-
-  {
-   name => 'usevisibilitygroups',
-   type => 'b',
-   default => 0
-  },
-
-  {
-   name => 'strict_isolation',
-   type => 'b',
-   default => 0
-  } );
-  return @param_list;
+    my $class = shift;
+
+    my @param_list = (
+        {
+            name    => 'makeproductgroups',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'chartgroup',
+            type    => 's',
+            choices => \&_get_all_group_names,
+            default => 'editbugs',
+            checker => \&check_group
+        },
+
+        {
+            name    => 'insidergroup',
+            type    => 's',
+            choices => \&_get_all_group_names,
+            default => '',
+            checker => \&check_group
+        },
+
+        {
+            name    => 'timetrackinggroup',
+            type    => 's',
+            choices => \&_get_all_group_names,
+            default => 'editbugs',
+            checker => \&check_group
+        },
+
+        {
+            name    => 'querysharegroup',
+            type    => 's',
+            choices => \&_get_all_group_names,
+            default => 'editbugs',
+            checker => \&check_group
+        },
+
+        {
+            name    => 'comment_taggers_group',
+            type    => 's',
+            choices => \&_get_all_group_names,
+            default => 'editbugs',
+            checker => \&check_comment_taggers_group
+        },
+
+        {
+            name    => 'debug_group',
+            type    => 's',
+            choices => \&_get_all_group_names,
+            default => 'admin',
+            checker => \&check_group
+        },
+
+        {
+            name    => 'usevisibilitygroups',
+            type    => 'b',
+            default => 0
+        },
+
+        {
+            name    => 'strict_isolation',
+            type    => 'b',
+            default => 0
+        }
+    );
+    return @param_list;
 }
 
 sub _get_all_group_names {
-    my @group_names = map {$_->name} Bugzilla::Group->get_all;
-    unshift(@group_names, '');
+    my @group_names = map { $_->name } Bugzilla::Group->get_all;
+    unshift( @group_names, '' );
     return \@group_names;
 }
 
index 0bc8240dfde442dd9a18bba5f466616f64913035..a3ce04fbe79909d087322cfc1408fc0a877e92ed 100644 (file)
@@ -16,50 +16,51 @@ use Bugzilla::Config::Common;
 our $sortkey = 1000;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'LDAPserver',
-   type => 't',
-   default => ''
-  },
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'LDAPserver',
+            type    => 't',
+            default => ''
+        },
 
-  {
-   name => 'LDAPstarttls',
-   type => 'b',
-   default => 0
-  },
+        {
+            name    => 'LDAPstarttls',
+            type    => 'b',
+            default => 0
+        },
 
-  {
-   name => 'LDAPbinddn',
-   type => 't',
-   default => ''
-  },
+        {
+            name    => 'LDAPbinddn',
+            type    => 't',
+            default => ''
+        },
 
-  {
-   name => 'LDAPBaseDN',
-   type => 't',
-   default => ''
-  },
+        {
+            name    => 'LDAPBaseDN',
+            type    => 't',
+            default => ''
+        },
 
-  {
-   name => 'LDAPuidattribute',
-   type => 't',
-   default => 'uid'
-  },
+        {
+            name    => 'LDAPuidattribute',
+            type    => 't',
+            default => 'uid'
+        },
 
-  {
-   name => 'LDAPmailattribute',
-   type => 't',
-   default => 'mail'
-  },
+        {
+            name    => 'LDAPmailattribute',
+            type    => 't',
+            default => 'mail'
+        },
 
-  {
-   name => 'LDAPfilter',
-   type => 't',
-   default => '',
-  } );
-  return @param_list;
+        {
+            name    => 'LDAPfilter',
+            type    => 't',
+            default => '',
+        }
+    );
+    return @param_list;
 }
 
 1;
index 8bbee3501c02d81f00cfff927259ef5aa2b4d94d..a12b425e2df6b9e2e0c2e2f6eb60f5bc2f780949 100644 (file)
@@ -36,6 +36,7 @@ use strict;
 use warnings;
 
 use Bugzilla::Config::Common;
+
 # Return::Value 1.666002 pollutes the error log with warnings about this
 # deprecated module. We have to set NO_CLUCK = 1 before loading Email::Send
 # to disable these warnings.
@@ -47,64 +48,66 @@ use Email::Send;
 our $sortkey = 1200;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'mail_delivery_method',
-   type => 's',
-   # Bugzilla is not ready yet to send mails to newsgroups, and 'IO'
-   # is of no use for now as we already have our own 'Test' mode.
-   choices => [grep {$_ ne 'NNTP' && $_ ne 'IO'} Email::Send->new()->all_mailers(), 'None'],
-   default => 'Sendmail',
-   checker => \&check_mail_delivery_method
-  },
+    my $class      = shift;
+    my @param_list = (
+        {
+            name => 'mail_delivery_method',
+            type => 's',
+
+            # Bugzilla is not ready yet to send mails to newsgroups, and 'IO'
+            # is of no use for now as we already have our own 'Test' mode.
+            choices => [ grep { $_ ne 'NNTP' && $_ ne 'IO' } Email::Send->new()->all_mailers(), 'None' ],
+            default => 'Sendmail',
+            checker => \&check_mail_delivery_method
+        },
 
-  {
-   name => 'mailfrom',
-   type => 't',
-   default => 'bugzilla-daemon'
-  },
+        {
+            name    => 'mailfrom',
+            type    => 't',
+            default => 'bugzilla-daemon'
+        },
 
-  {
-   name => 'use_mailer_queue',
-   type => 'b',
-   default => 0,
-   checker => \&check_theschwartz_available,
-  },
+        {
+            name    => 'use_mailer_queue',
+            type    => 'b',
+            default => 0,
+            checker => \&check_theschwartz_available,
+        },
 
-  {
-   name => 'smtpserver',
-   type => 't',
-   default => 'localhost'
-  },
-  {
-   name => 'smtp_username',
-   type => 't',
-   default => '',
-   checker => \&check_smtp_auth
-  },
-  {
-   name => 'smtp_password',
-   type => 'p',
-   default => ''
-  },
-  {
-   name => 'smtp_debug',
-   type => 'b',
-   default => 0
-  },
-  {
-   name => 'whinedays',
-   type => 't',
-   default => 7,
-   checker => \&check_numeric
-  },
-  {
-   name => 'globalwatchers',
-   type => 't',
-   default => '',
-  }, );
-  return @param_list;
+        {
+            name    => 'smtpserver',
+            type    => 't',
+            default => 'localhost'
+        },
+        {
+            name    => 'smtp_username',
+            type    => 't',
+            default => '',
+            checker => \&check_smtp_auth
+        },
+        {
+            name    => 'smtp_password',
+            type    => 'p',
+            default => ''
+        },
+        {
+            name    => 'smtp_debug',
+            type    => 'b',
+            default => 0
+        },
+        {
+            name    => 'whinedays',
+            type    => 't',
+            default => 7,
+            checker => \&check_numeric
+        },
+        {
+            name    => 'globalwatchers',
+            type    => 't',
+            default => '',
+        },
+    );
+    return @param_list;
 }
 
 1;
index 03dfc02a61a54041b30f32d550ed4ada3021a024..98c8c675ff61815c357736597d770b944022d0d9 100644 (file)
@@ -40,38 +40,39 @@ use Bugzilla::Config::Common;
 our $sortkey = 1300;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name    => 'cvsroot',
-   type    => 't',
-   default => '',
-  },
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'cvsroot',
+            type    => 't',
+            default => '',
+        },
 
-  {
-   name    => 'cvsroot_get',
-   type    => 't',
-   default => '',
-  },
+        {
+            name    => 'cvsroot_get',
+            type    => 't',
+            default => '',
+        },
 
-  {
-   name    => 'bonsai_url',
-   type    => 't',
-   default => ''
-  },
+        {
+            name    => 'bonsai_url',
+            type    => 't',
+            default => ''
+        },
 
-  {
-   name    => 'lxr_url',
-   type    => 't',
-   default => ''
-  },
+        {
+            name    => 'lxr_url',
+            type    => 't',
+            default => ''
+        },
 
-  {
-   name    => 'lxr_root',
-   type    => 't',
-   default => '',
-  } );
-  return @param_list;
+        {
+            name    => 'lxr_root',
+            type    => 't',
+            default => '',
+        }
+    );
+    return @param_list;
 }
 
 1;
index 00ddf432381c65b2592eb608bd1f1851023e7c30..b6397a835ab89fe3c11ae5f70ece660047548aba 100644 (file)
@@ -16,56 +16,58 @@ use Bugzilla::Config::Common;
 our $sortkey = 1400;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'quip_list_entry_control',
-   type => 's',
-   choices => ['open', 'moderated', 'closed'],
-   default => 'open',
-   checker => \&check_multi
-  },
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'quip_list_entry_control',
+            type    => 's',
+            choices => [ 'open', 'moderated', 'closed' ],
+            default => 'open',
+            checker => \&check_multi
+        },
 
-  {
-   name => 'mostfreqthreshold',
-   type => 't',
-   default => '2',
-   checker => \&check_numeric
-  },
+        {
+            name    => 'mostfreqthreshold',
+            type    => 't',
+            default => '2',
+            checker => \&check_numeric
+        },
 
-  {
-   name => 'mybugstemplate',
-   type => 't',
-   default => 'buglist.cgi?resolution=---&amp;emailassigned_to1=1&amp;emailreporter1=1&amp;emailtype1=exact&amp;email1=%userid%'
-  },
+        {
+            name => 'mybugstemplate',
+            type => 't',
+            default =>
+                'buglist.cgi?resolution=---&amp;emailassigned_to1=1&amp;emailreporter1=1&amp;emailtype1=exact&amp;email1=%userid%'
+        },
 
-  {
-   name => 'defaultquery',
-   type => 't',
-   default => 'resolution=---&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&emaillongdesc3=1&order=Importance&long_desc_type=substring'
-  },
+        {
+            name => 'defaultquery',
+            type => 't',
+            default =>
+                'resolution=---&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&emaillongdesc3=1&order=Importance&long_desc_type=substring'
+        },
 
-  {
-   name => 'search_allow_no_criteria',
-   type => 'b',
-   default => 1
-  },
+        {
+            name    => 'search_allow_no_criteria',
+            type    => 'b',
+            default => 1
+        },
 
-  {
-    name => 'default_search_limit',
-    type => 't',
-    default => '500',
-    checker => \&check_numeric
-  },
+        {
+            name    => 'default_search_limit',
+            type    => 't',
+            default => '500',
+            checker => \&check_numeric
+        },
 
-  {
-    name => 'max_search_results',
-    type => 't',
-    default => '10000',
-    checker => \&check_numeric
-  },
-  );
-  return @param_list;
+        {
+            name    => 'max_search_results',
+            type    => 't',
+            default => '10000',
+            checker => \&check_numeric
+        },
+    );
+    return @param_list;
 }
 
 1;
index 8e30b07a9881482fe5d4460e679055faa248333b..bc980a1ec8e4d2012973b98702c4a20542507447 100644 (file)
@@ -16,33 +16,33 @@ use Bugzilla::Config::Common;
 our $sortkey = 1100;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name =>    'RADIUS_server',
-   type =>    't',
-   default => ''
-  },
-
-  {
-   name =>    'RADIUS_secret',
-   type =>    't',
-   default => ''
-  },
-
-  {
-   name =>    'RADIUS_NAS_IP',
-   type =>    't',
-   default => ''
-  },
-
-  {
-   name =>    'RADIUS_email_suffix',
-   type =>    't',
-   default => ''
-  },
-  );
-  return @param_list;
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'RADIUS_server',
+            type    => 't',
+            default => ''
+        },
+
+        {
+            name    => 'RADIUS_secret',
+            type    => 't',
+            default => ''
+        },
+
+        {
+            name    => 'RADIUS_NAS_IP',
+            type    => 't',
+            default => ''
+        },
+
+        {
+            name    => 'RADIUS_email_suffix',
+            type    => 't',
+            default => ''
+        },
+    );
+    return @param_list;
 }
 
 1;
index 5dbbb5202a172385088e33093c4d16e5942a67f5..772df56756a2d8212b2eab45f596f338e26e34c7 100644 (file)
@@ -16,36 +16,37 @@ use Bugzilla::Config::Common;
 our $sortkey = 1500;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'shadowdbhost',
-   type => 't',
-   default => '',
-  },
-
-  {
-   name => 'shadowdbport',
-   type => 't',
-   default => '3306',
-   checker => \&check_numeric,
-  },
-
-  {
-   name => 'shadowdbsock',
-   type => 't',
-   default => '',
-  },
-
-  # This entry must be _after_ the shadowdb{host,port,sock} settings so that
-  # they can be used in the validation here
-  {
-   name => 'shadowdb',
-   type => 't',
-   default => '',
-   checker => \&check_shadowdb
-  } );
-  return @param_list;
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'shadowdbhost',
+            type    => 't',
+            default => '',
+        },
+
+        {
+            name    => 'shadowdbport',
+            type    => 't',
+            default => '3306',
+            checker => \&check_numeric,
+        },
+
+        {
+            name    => 'shadowdbsock',
+            type    => 't',
+            default => '',
+        },
+
+        # This entry must be _after_ the shadowdb{host,port,sock} settings so that
+        # they can be used in the validation here
+        {
+            name    => 'shadowdb',
+            type    => 't',
+            default => '',
+            checker => \&check_shadowdb
+        }
+    );
+    return @param_list;
 }
 
 1;
index 72a9468e61be93c0212ac7fc5d9b6219cc07ac59..ddb850f3b1b23f9dee4e805b1e9e871257423d6e 100644 (file)
@@ -16,33 +16,34 @@ use Bugzilla::Config::Common;
 our $sortkey = 1600;
 
 sub get_param_list {
-  my $class = shift;
-  my @param_list = (
-  {
-   name => 'usemenuforusers',
-   type => 'b',
-   default => '0'
-  },
-
-  {
-   name    => 'ajax_user_autocompletion',
-   type    => 'b',
-   default => '1',
-  },
-
-  {
-   name    => 'maxusermatches',
-   type    => 't',
-   default => '1000',
-   checker => \&check_numeric
-  },
-
-  {
-   name    => 'confirmuniqueusermatch',
-   type    => 'b',
-   default => 1,
-  } );
-  return @param_list;
+    my $class      = shift;
+    my @param_list = (
+        {
+            name    => 'usemenuforusers',
+            type    => 'b',
+            default => '0'
+        },
+
+        {
+            name    => 'ajax_user_autocompletion',
+            type    => 'b',
+            default => '1',
+        },
+
+        {
+            name    => 'maxusermatches',
+            type    => 't',
+            default => '1000',
+            checker => \&check_numeric
+        },
+
+        {
+            name    => 'confirmuniqueusermatch',
+            type    => 'b',
+            default => 1,
+        }
+    );
+    return @param_list;
 }
 
 1;