summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-08-04 19:09:47 +0200
committerGitHub <noreply@github.com>2017-08-04 19:09:47 +0200
commit28a1de6319da8b481b9b5ec08f070bce65e17bb3 (patch)
treeeb847858414dd851ee18a1f6c43ed22b2d265829 /Bugzilla
parente0dc311bfb82168bce140113198697958ad386b8 (diff)
downloadbugzilla-28a1de6319da8b481b9b5ec08f070bce65e17bb3.tar.gz
bugzilla-28a1de6319da8b481b9b5ec08f070bce65e17bb3.tar.xz
Bug 1387459 - Tidy the Bugzilla/Config/*.pm modules
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Config/Admin.pm93
-rw-r--r--Bugzilla/Config/Advanced.pm128
-rw-r--r--Bugzilla/Config/Attachment.pm21
-rw-r--r--Bugzilla/Config/Auth.pm263
-rw-r--r--Bugzilla/Config/BugChange.pm120
-rw-r--r--Bugzilla/Config/BugFields.pm165
-rw-r--r--Bugzilla/Config/Common.pm195
-rw-r--r--Bugzilla/Config/Core.pm50
-rw-r--r--Bugzilla/Config/DependencyGraph.pm19
-rw-r--r--Bugzilla/Config/General.pm83
-rw-r--r--Bugzilla/Config/GroupSecurity.pm143
-rw-r--r--Bugzilla/Config/LDAP.pm77
-rw-r--r--Bugzilla/Config/MTA.pm113
-rw-r--r--Bugzilla/Config/PatchViewer.pm57
-rw-r--r--Bugzilla/Config/Query.pm90
-rw-r--r--Bugzilla/Config/RADIUS.pm54
-rw-r--r--Bugzilla/Config/ShadowDB.pm61
-rw-r--r--Bugzilla/Config/UserMatch.pm55
18 files changed, 900 insertions, 887 deletions
diff --git a/Bugzilla/Config/Admin.pm b/Bugzilla/Config/Admin.pm
index 5f10bfef3..ad24f7112 100644
--- a/Bugzilla/Config/Admin.pm
+++ b/Bugzilla/Config/Admin.pm
@@ -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 {
diff --git a/Bugzilla/Config/Advanced.pm b/Bugzilla/Config/Advanced.pm
index 4bf774ae0..d7fdd34aa 100644
--- a/Bugzilla/Config/Advanced.pm
+++ b/Bugzilla/Config/Advanced.pm
@@ -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";
}
diff --git a/Bugzilla/Config/Attachment.pm b/Bugzilla/Config/Attachment.pm
index b81d21e53..bc2f45029 100644
--- a/Bugzilla/Config/Attachment.pm
+++ b/Bugzilla/Config/Attachment.pm
@@ -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';
diff --git a/Bugzilla/Config/Auth.pm b/Bugzilla/Config/Auth.pm
index 9e1f89ef9..dddedd819 100644
--- a/Bugzilla/Config/Auth.pm
+++ b/Bugzilla/Config/Auth.pm
@@ -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;
diff --git a/Bugzilla/Config/BugChange.pm b/Bugzilla/Config/BugChange.pm
index 0acdc0ce4..f9c33512a 100644
--- a/Bugzilla/Config/BugChange.pm
+++ b/Bugzilla/Config/BugChange.pm
@@ -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;
diff --git a/Bugzilla/Config/BugFields.pm b/Bugzilla/Config/BugFields.pm
index 0111ac6a8..94a16b7c2 100644
--- a/Bugzilla/Config/BugFields.pm
+++ b/Bugzilla/Config/BugFields.pm
@@ -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;
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index 897b4e2eb..cbb030a9c 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -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);
diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm
index 654e569ba..b3848a16e 100644
--- a/Bugzilla/Config/Core.pm
+++ b/Bugzilla/Config/Core.pm
@@ -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;
diff --git a/Bugzilla/Config/DependencyGraph.pm b/Bugzilla/Config/DependencyGraph.pm
index f9f3c0af5..965be803a 100644
--- a/Bugzilla/Config/DependencyGraph.pm
+++ b/Bugzilla/Config/DependencyGraph.pm
@@ -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;
diff --git a/Bugzilla/Config/General.pm b/Bugzilla/Config/General.pm
index 5efaa6f6c..9d85aecaf 100644
--- a/Bugzilla/Config/General.pm
+++ b/Bugzilla/Config/General.pm
@@ -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;
diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm
index 016bc82f7..c9d6421d3 100644
--- a/Bugzilla/Config/GroupSecurity.pm
+++ b/Bugzilla/Config/GroupSecurity.pm
@@ -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;
}
diff --git a/Bugzilla/Config/LDAP.pm b/Bugzilla/Config/LDAP.pm
index 0bc8240df..a3ce04fbe 100644
--- a/Bugzilla/Config/LDAP.pm
+++ b/Bugzilla/Config/LDAP.pm
@@ -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;
diff --git a/Bugzilla/Config/MTA.pm b/Bugzilla/Config/MTA.pm
index 8bbee3501..a12b425e2 100644
--- a/Bugzilla/Config/MTA.pm
+++ b/Bugzilla/Config/MTA.pm
@@ -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;
diff --git a/Bugzilla/Config/PatchViewer.pm b/Bugzilla/Config/PatchViewer.pm
index 03dfc02a6..98c8c675f 100644
--- a/Bugzilla/Config/PatchViewer.pm
+++ b/Bugzilla/Config/PatchViewer.pm
@@ -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;
diff --git a/Bugzilla/Config/Query.pm b/Bugzilla/Config/Query.pm
index 00ddf4323..b6397a835 100644
--- a/Bugzilla/Config/Query.pm
+++ b/Bugzilla/Config/Query.pm
@@ -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;
diff --git a/Bugzilla/Config/RADIUS.pm b/Bugzilla/Config/RADIUS.pm
index 8e30b07a9..bc980a1ec 100644
--- a/Bugzilla/Config/RADIUS.pm
+++ b/Bugzilla/Config/RADIUS.pm
@@ -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;
diff --git a/Bugzilla/Config/ShadowDB.pm b/Bugzilla/Config/ShadowDB.pm
index 5dbbb5202..772df5675 100644
--- a/Bugzilla/Config/ShadowDB.pm
+++ b/Bugzilla/Config/ShadowDB.pm
@@ -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;
diff --git a/Bugzilla/Config/UserMatch.pm b/Bugzilla/Config/UserMatch.pm
index 72a9468e6..ddb850f3b 100644
--- a/Bugzilla/Config/UserMatch.pm
+++ b/Bugzilla/Config/UserMatch.pm
@@ -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;