summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-12 17:51:52 +0200
committerlpsolit%gmail.com <>2005-10-12 17:51:52 +0200
commitb8f2c324a9a4133f264254d61993ff8c7e0233a2 (patch)
tree312fb1aba4325c769a93939937a5f79f01fb7e02
parent5eee7ab7fb527d926bfdf5927268862048cd4479 (diff)
downloadbugzilla-b8f2c324a9a4133f264254d61993ff8c7e0233a2.tar.gz
bugzilla-b8f2c324a9a4133f264254d61993ff8c7e0233a2.tar.xz
Bug 46296: Make editparams.cgi be multi-panel by category - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel a=justdave
-rw-r--r--Bugzilla/Config.pm105
-rw-r--r--Bugzilla/Config/Admin.pm105
-rw-r--r--Bugzilla/Config/Auth.pm135
-rw-r--r--Bugzilla/Config/BugChange.pm142
-rw-r--r--Bugzilla/Config/BugFields.pm108
-rw-r--r--Bugzilla/Config/BugMove.pm93
-rw-r--r--Bugzilla/Config/Common.pm386
-rw-r--r--Bugzilla/Config/Core.pm103
-rw-r--r--Bugzilla/Config/DependencyGraph.pm52
-rw-r--r--Bugzilla/Config/GroupSecurity.pm81
-rw-r--r--Bugzilla/Config/L10n.pm78
-rw-r--r--Bugzilla/Config/LDAP.pm81
-rw-r--r--Bugzilla/Config/MTA.pm173
-rw-r--r--Bugzilla/Config/PatchViewer.pm75
-rw-r--r--Bugzilla/Config/Query.pm78
-rw-r--r--Bugzilla/Config/ShadowDB.pm73
-rw-r--r--Bugzilla/Config/UserMatch.pm71
-rw-r--r--defparams.pl1508
-rwxr-xr-xdoeditparams.cgi118
-rwxr-xr-xeditparams.cgi179
-rw-r--r--skins/standard/params.css44
-rw-r--r--template/en/default/admin/params/admin.html.tmpl66
-rw-r--r--template/en/default/admin/params/auth.html.tmpl124
-rw-r--r--template/en/default/admin/params/bugchange.html.tmpl78
-rw-r--r--template/en/default/admin/params/bugfields.html.tmpl62
-rw-r--r--template/en/default/admin/params/bugmove.html.tmpl50
-rw-r--r--template/en/default/admin/params/common.html.tmpl75
-rw-r--r--template/en/default/admin/params/core.html.tmpl68
-rw-r--r--template/en/default/admin/params/dependencygraph.html.tmpl50
-rw-r--r--template/en/default/admin/params/editparams.html.tmpl90
-rw-r--r--template/en/default/admin/params/groupsecurity.html.tmpl51
-rw-r--r--template/en/default/admin/params/l10n.html.tmpl46
-rw-r--r--template/en/default/admin/params/ldap.html.tmpl46
-rw-r--r--template/en/default/admin/params/mta.html.tmpl109
-rw-r--r--template/en/default/admin/params/patchviewer.html.tmpl65
-rw-r--r--template/en/default/admin/params/query.html.tmpl58
-rw-r--r--template/en/default/admin/params/shadowdb.html.tmpl50
-rw-r--r--template/en/default/admin/params/usermatch.html.tmpl45
-rw-r--r--template/en/default/global/messages.html.tmpl16
-rw-r--r--template/en/default/global/user-error.html.tmpl4
40 files changed, 3133 insertions, 1808 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index 6e7968b07..e30d48cb9 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -26,6 +26,7 @@
# Bradley Baetz <bbaetz@student.usyd.edu.au>
# Christopher Aillon <christopher@aillon.com>
# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
package Bugzilla::Config;
@@ -69,6 +70,8 @@ if ($ENV{'PROJECT'} && $ENV{'PROJECT'} =~ /^(\w+)$/) {
our $attachdir = "$datadir/attachments";
our $webdotdir = "$datadir/webdot";
+our @parampanels = ();
+
# Module stuff
@Bugzilla::Config::EXPORT = qw(Param);
@@ -81,12 +84,13 @@ our $webdotdir = "$datadir/webdot";
%Bugzilla::Config::EXPORT_TAGS =
(
- admin => [qw(GetParamList UpdateParams SetParam WriteParams)],
+ admin => [qw(UpdateParams SetParam WriteParams)],
db => [qw($db_driver $db_host $db_port $db_name $db_user $db_pass $db_sock)],
locations => [qw($libpath $localconfig $attachdir $datadir $templatedir
$webdotdir $project)],
+ params => [qw(@parampanels)],
);
-Exporter::export_ok_tags('admin', 'db', 'locations');
+Exporter::export_ok_tags('admin', 'db', 'locations', 'params');
# Bugzilla version
$Bugzilla::Config::VERSION = "2.21.1+";
@@ -139,17 +143,21 @@ sub _load_datafiles {
# Load in the datafiles
_load_datafiles();
-# Load in the param defintions
-unless (my $ret = do 'defparams.pl') {
- die "Couldn't parse defparams.pl: $@" if $@;
- die "Couldn't do defparams.pl: $!" unless defined $ret;
- die "Couldn't run defparams.pl" unless $ret;
-}
-
# Stick the params into a hash
my %params;
-foreach my $item (@param_list) {
- $params{$item->{'name'}} = $item;
+
+# Load in the param definitions
+foreach my $item ((glob "$libpath/Bugzilla/Config/*.pm")) {
+ $item =~ m#/([^/]+)\.pm$#;
+ my $module = $1;
+ next if ($module eq 'Common');
+ require "Bugzilla/Config/$module.pm";
+ my @new_param_list = "Bugzilla::Config::$module"->get_param_list();
+ foreach my $item (@new_param_list) {
+ $params{$item->{'name'}} = $item;
+ }
+ push(@parampanels, $module);
+ push(@param_list, @new_param_list);
}
# END INIT CODE
@@ -174,10 +182,6 @@ sub Param {
die "No value for param $param (try running checksetup.pl again)";
}
-sub GetParamList {
- return @param_list;
-}
-
sub SetParam {
my ($name, $value) = @_;
@@ -327,45 +331,6 @@ sub ChmodDataFile {
chmod $perm,$file;
}
-sub check_multi {
- my ($value, $param) = (@_);
-
- 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") {
- foreach my $chkParam (@$value) {
- unless (scalar(grep {$_ eq $chkParam} (@{$param->{'choices'}}))) {
- return "Invalid choice '$chkParam' for multi-select list param '$param->{'name'}'";
- }
- }
-
- return "";
- }
- else {
- return "Invalid param type '$param->{'type'}' for check_multi(); " .
- "contact your Bugzilla administrator";
- }
-}
-
-sub check_numeric {
- my ($value) = (@_);
- if ($value !~ /^[0-9]+$/) {
- return "must be a numeric value";
- }
- return "";
-}
-
-sub check_regexp {
- my ($value) = (@_);
- eval { qr/$value/ };
- return $@;
-}
-
1;
__END__
@@ -384,7 +349,6 @@ Bugzilla::Config - Configuration parameters for Bugzilla
# Administration functions
use Bugzilla::Config qw(:admin);
- my @valid_params = GetParamList();
my @removed_params = UpgradeParams();
SetParam($param, $value);
WriteParams();
@@ -410,13 +374,6 @@ Parameters can be set, retrieved, and updated.
Returns the Param with the specified name. Either a string, or, in the case
of multiple-choice parameters, an array reference.
-=item C<GetParamList()>
-
-Returns the list of known parameter types, from defparams.pl. Users should not
-rely on this method; it is intended for editparams/doeditparams only
-
-The format for the list is specified in defparams.pl
-
=item C<SetParam($name, $value)>
Sets the param named $name to $value. Values are checked using the checker
@@ -436,11 +393,7 @@ Writes the parameters to disk.
=back
-=head2 Parameter checking functions
-
-All parameter checking functions are called with two parameters:
-
-=over 4
+=over
=item *
@@ -450,24 +403,6 @@ The new value for the parameter
A reference to the entry in the param list for this parameter
-=back
-
Functions should return error text, or the empty string if there was no error.
-=over 4
-
-=item C<check_multi>
-
-Checks that a multi-valued parameter (ie type C<s> or type C<m>) satisfies
-its contraints.
-
-=item C<check_numeric>
-
-Checks that the value is a valid number
-
-=item C<check_regexp>
-
-Checks that the value is a valid regexp
-
=back
-
diff --git a/Bugzilla/Config/Admin.pm b/Bugzilla/Config/Admin.pm
new file mode 100644
index 000000000..f416b7fe6
--- /dev/null
+++ b/Bugzilla/Config/Admin.pm
@@ -0,0 +1,105 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::Admin;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::Admin::sortkey = "01";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'allowbugdeletion',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'allowemailchange',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'allowuserdeletion',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'supportwatchers',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'maxpatchsize',
+ type => 't',
+ default => '1000',
+ checker => \&check_numeric
+ },
+
+ {
+ name => 'maxattachmentsize',
+ type => 't',
+ default => '1000',
+ checker => \&check_numeric
+ },
+
+ # The maximum size (in bytes) for patches and non-patch attachments.
+ # The default limit is 1000KB, which is 24KB less than mysql's default
+ # maximum packet size (which determines how much data can be sent in a
+ # single mysql packet and thus how much data can be inserted into the
+ # database) to provide breathing space for the data in other fields of
+ # the attachment record as well as any mysql packet overhead (I don't
+ # know of any, but I suspect there may be some.)
+
+ {
+ name => 'maxlocalattachment',
+ type => 't',
+ default => '0',
+ checker => \&check_numeric
+ },
+
+ {
+ name => 'convert_uncompressed_images',
+ type => 'b',
+ default => 0,
+ checker => \&check_image_converter
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/Auth.pm b/Bugzilla/Config/Auth.pm
new file mode 100644
index 000000000..6b0cf7683
--- /dev/null
+++ b/Bugzilla/Config/Auth.pm
@@ -0,0 +1,135 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::Auth;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::Auth::sortkey = "02";
+
+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 => 's',
+ choices => [ 'DB', 'LDAP', 'DB,LDAP', 'LDAP,DB' ],
+ default => 'DB',
+ checker => \&check_user_verify_class
+ },
+
+ {
+ name => 'rememberlogin',
+ type => 's',
+ choices => ['on', 'defaulton', 'defaultoff', 'off'],
+ default => 'on',
+ checker => \&check_multi
+ },
+
+ {
+ name => 'loginnetmask',
+ type => 't',
+ default => '32',
+ checker => \&check_netmask
+ },
+
+ {
+ name => 'requirelogin',
+ 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
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/BugChange.pm b/Bugzilla/Config/BugChange.pm
new file mode 100644
index 000000000..6ea20b6a8
--- /dev/null
+++ b/Bugzilla/Config/BugChange.pm
@@ -0,0 +1,142 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::BugChange;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::BugChange::sortkey = "03";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'letsubmitterchoosepriority',
+ type => 'b',
+ default => 1
+ },
+
+ {
+ name => 'letsubmitterchoosemilestone',
+ type => 'b',
+ default => 1
+ },
+
+ {
+ name => 'defaultpriority',
+ type => 't',
+ default => 'P2',
+ checker => \&check_priority
+ },
+
+ {
+ name => 'musthavemilestoneonaccept',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentoncreate',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonaccept',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonclearresolution',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonconfirm',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonresolve',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonreassign',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonreassignbycomponent',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonreopen',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonverify',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'commentonclose',
+ 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
new file mode 100644
index 000000000..ac0ef85d9
--- /dev/null
+++ b/Bugzilla/Config/BugFields.pm
@@ -0,0 +1,108 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::BugFields;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::BugFields::sortkey = "04";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'useclassification',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'showallproducts',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'usetargetmilestone',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'useqacontact',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'usestatuswhiteboard',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'usevotes',
+ type => 'b',
+ default => 1
+ },
+
+ {
+ name => 'usebugaliases',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'defaultseverity',
+ type => 't',
+ default => 'normal',
+ checker => \&check_severity
+ },
+
+ {
+ name => 'defaultplatform',
+ type => 't',
+ default => '',
+ checker => \&check_platform
+ },
+
+ {
+ name => 'defaultopsys',
+ type => 't',
+ default => '',
+ checker => \&check_opsys
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/BugMove.pm b/Bugzilla/Config/BugMove.pm
new file mode 100644
index 000000000..87f6cbd73
--- /dev/null
+++ b/Bugzilla/Config/BugMove.pm
@@ -0,0 +1,93 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::BugMove;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::BugMove::sortkey = "05";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'move-enabled',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'move-button-text',
+ type => 't',
+ default => 'Move To Bugscape'
+ },
+
+ {
+ name => 'move-to-url',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'move-to-address',
+ type => 't',
+ default => 'bugzilla-import'
+ },
+
+ {
+ name => 'moved-from-address',
+ type => 't',
+ default => 'bugzilla-admin'
+ },
+
+ {
+ name => 'movers',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'moved-default-product',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'moved-default-component',
+ type => 't',
+ default => ''
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
new file mode 100644
index 000000000..721651830
--- /dev/null
+++ b/Bugzilla/Config/Common.pm
@@ -0,0 +1,386 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+# This file defines all the parameters that we have a GUI to edit within
+# Bugzilla.
+
+# ATTENTION!!!! THIS FILE ONLY CONTAINS THE DEFAULTS.
+# You cannot change your live settings by editing this file.
+# Only adding new parameters is done here. Once the parameter exists, you
+# must use %baseurl%/editparams.cgi from the web to edit the settings.
+
+# This file is included via |do|, mainly because of circular dependency issues
+# (such as globals.pl -> Bugzilla::Config -> this -> Bugzilla::Config)
+# which preclude compile time loading.
+
+# Those issues may go away at some point, and the contents of this file
+# moved somewhere else. Please try to avoid more dependencies from here
+# to other code
+
+# (Note that these aren't just added directly to Bugzilla::Config, because
+# the backend prefs code is separate to this...)
+
+package Bugzilla::Config::Common;
+
+use strict;
+
+use Socket;
+
+use Bugzilla::Config qw(:DEFAULT $templatedir $webdotdir);
+use Bugzilla::Util;
+use Bugzilla::Constants;
+
+use base qw(Exporter);
+@Bugzilla::Config::Common::EXPORT =
+ qw(check_sslbase check_priority check_severity check_platform
+ check_opsys check_shadowdb check_urlbase check_webdotbase
+ check_netmask check_user_verify_class check_image_converter
+ check_languages check_mail_delivery_method
+);
+
+# Checking functions for the various values
+
+sub check_multi {
+ my ($value, $param) = (@_);
+
+ 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") {
+ foreach my $chkParam (@$value) {
+ unless (scalar(grep {$_ eq $chkParam} (@{$param->{'choices'}}))) {
+ return "Invalid choice '$chkParam' for multi-select list param '$param->{'name'}'";
+ }
+ }
+
+ return "";
+ }
+ else {
+ return "Invalid param type '$param->{'type'}' for check_multi(); " .
+ "contact your Bugzilla administrator";
+ }
+}
+
+sub check_numeric {
+ my ($value) = (@_);
+ if ($value !~ /^[0-9]+$/) {
+ return "must be a numeric value";
+ }
+ return "";
+}
+
+sub check_regexp {
+ my ($value) = (@_);
+ eval { qr/$value/ };
+ return $@;
+}
+
+sub check_sslbase {
+ my $url = shift;
+ 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;
+ if ($host =~ /:\d+$/) {
+ return "must not contain a port.";
+ }
+ local *SOCK;
+ my $proto = getprotobyname('tcp');
+ socket(SOCK, PF_INET, SOCK_STREAM, $proto);
+ my $sin = sockaddr_in(443, inet_aton($host));
+ if (!connect(SOCK, $sin)) {
+ return "Failed to connect to " . html_quote($host) .
+ ":443, unable to enable SSL.";
+ }
+ }
+ return "";
+}
+
+sub check_priority {
+ my ($value) = (@_);
+ &::GetVersionTable();
+ if (lsearch(\@::legal_priority, $value) < 0) {
+ return "Must be a legal priority value: one of " .
+ join(", ", @::legal_priority);
+ }
+ return "";
+}
+
+sub check_severity {
+ my ($value) = (@_);
+ &::GetVersionTable();
+ if (lsearch(\@::legal_severity, $value) < 0) {
+ return "Must be a legal severity value: one of " .
+ join(", ", @::legal_severity);
+ }
+ return "";
+}
+
+sub check_platform {
+ my ($value) = (@_);
+ &::GetVersionTable();
+ if (lsearch(['', @::legal_platform], $value) < 0) {
+ return "Must be empty or a legal platform value: one of " .
+ join(", ", @::legal_platform);
+ }
+ return "";
+}
+
+sub check_opsys {
+ my ($value) = (@_);
+ &::GetVersionTable();
+ if (lsearch(['', @::legal_opsys], $value) < 0) {
+ return "Must be empty or a legal operating system value: one of " .
+ join(", ", @::legal_opsys);
+ }
+ return "";
+}
+
+sub check_shadowdb {
+ my ($value) = (@_);
+ $value = trim($value);
+ if ($value eq "") {
+ return "";
+ }
+
+ if (!Param('shadowdbhost')) {
+ return "You need to specify a host when using a shadow database";
+ }
+
+ # Can't test existence of this because ConnectToDatabase uses the param,
+ # but we can't set this before testing....
+ # This can really only be fixed after we can use the DBI more openly
+ return "";
+}
+
+sub check_urlbase {
+ my ($url) = (@_);
+ if ($url !~ m:^http.*/$:) {
+ return "must be a legal URL, that starts with http and ends with a slash.";
+ }
+ return "";
+}
+
+sub check_webdotbase {
+ my ($value) = (@_);
+ $value = trim($value);
+ 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.";
+ }
+ # Check .htaccess allows access to generated images
+ 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";
+ }
+ close HTACCESS;
+ }
+ }
+ return "";
+}
+
+sub check_netmask {
+ my ($mask) = @_;
+ my $res = check_numeric($mask);
+ return $res if $res;
+ if ($mask < 0 || $mask > 32) {
+ return "an IPv4 netmask must be between 0 and 32 bits";
+ }
+ # Note that if we changed the netmask from anything apart from 32, then
+ # existing logincookies which aren't for a single IP won't work
+ # any more. We can't know which ones they are, though, so they'll just
+ # take space until they're preiodically cleared, later.
+
+ return "";
+}
+
+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
+ # params mutually dependent on each other.
+ # This means that if someone clears the LDAP config params after setting
+ # the login method as LDAP, we won't notice, but all logins will fail.
+ # So don't do that.
+
+ my ($list, $entry) = @_;
+ for my $class (split /,\s*/, $list) {
+ my $res = check_multi($class, $entry);
+ return $res if $res;
+ if ($class eq 'DB') {
+ # No params
+ } elsif ($class eq 'LDAP') {
+ eval "require Net::LDAP";
+ return "Error requiring Net::LDAP: '$@'" if $@;
+ return "LDAP servername is missing" unless Param("LDAPserver");
+ return "LDAPBaseDN is empty" unless Param("LDAPBaseDN");
+ } else {
+ return "Unknown user_verify_class '$class' in check_user_verify_class";
+ }
+ }
+ return "";
+}
+
+sub check_image_converter {
+ my ($value, $hash) = @_;
+ if ($value == 1){
+ eval "require Image::Magick";
+ return "Error requiring Image::Magick: '$@'" if $@;
+ }
+ return "";
+}
+
+sub check_languages {
+ my @languages = split /[,\s]+/, trim($_[0]);
+ if(!scalar(@languages)) {
+ return "You need to specify a language tag."
+ }
+ foreach my $language (@languages) {
+ if( ! -d "$templatedir/$language/custom"
+ && ! -d "$templatedir/$language/default") {
+ return "The template directory for $language does not exist";
+ }
+ }
+ return "";
+}
+
+sub check_mail_delivery_method {
+ my $check = check_multi(@_);
+ return $check if $check;
+ my $mailer = shift;
+ if ($mailer eq 'sendmail' && $^O =~ /MSWin32/i) {
+ # look for sendmail.exe
+ return "Failed to locate " . SENDMAIL_EXE
+ unless -e SENDMAIL_EXE;
+ }
+ return "";
+}
+
+# OK, here are the parameter definitions themselves.
+#
+# Each definition is a hash with keys:
+#
+# name - name of the param
+# desc - description of the param (for editparams.cgi)
+# type - see below
+# choices - (optional) see below
+# default - default value for the param
+# checker - (optional) checking function for validating parameter entry
+# It is called with the value of the param as the first arg and a
+# reference to the param's hash as the second argument
+#
+# The type value can be one of the following:
+#
+# t -- A short text entry field (suitable for a single line)
+# l -- A long text field (suitable for many lines)
+# b -- A boolean value (either 1 or 0)
+# m -- A list of values, with many selectable (shows up as a select box)
+# To specify the list of values, make the 'choices' key be an array
+# reference of the valid choices. The 'default' key should be an array
+# reference for the list of selected values (which must appear in the
+# first anonymous array), i.e.:
+# {
+# name => 'multiselect',
+# desc => 'A list of options, choose many',
+# type => 'm',
+# choices => [ 'a', 'b', 'c', 'd' ],
+# default => [ 'a', 'd' ],
+# checker => \&check_multi
+# }
+#
+# Here, 'a' and 'd' are the default options, and the user may pick any
+# combination of a, b, c, and d as valid options.
+#
+# &check_multi should always be used as the param verification function
+# for list (single and multiple) parameter types.
+#
+# s -- A list of values, with one selectable (shows up as a select box)
+# To specify the list of values, make the 'choices' key be an array
+# reference of the valid choices. The 'default' key should be one of
+# those values, i.e.:
+# {
+# name => 'singleselect',
+# desc => 'A list of options, choose one',
+# type => 's',
+# choices => [ 'a', 'b', 'c' ],
+# default => 'b',
+# checker => \&check_multi
+# }
+#
+# Here, 'b' is the default option, and 'a' and 'c' are other possible
+# options, but only one at a time!
+#
+# &check_multi should always be used as the param verification function
+# for list (single and multiple) parameter types.
+
+sub get_param_list {
+ return;
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Bugzilla::Config::Common - Parameter checking functions
+
+=head1 DESCRIPTION
+
+All parameter checking functions are called with two parameters:
+
+=head2 Functions
+
+=over
+
+=item C<check_multi>
+
+Checks that a multi-valued parameter (ie type C<s> or type C<m>) satisfies
+its contraints.
+
+=item C<check_numeric>
+
+Checks that the value is a valid number
+
+=item C<check_regexp>
+
+Checks that the value is a valid regexp
+
+=back
diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm
new file mode 100644
index 000000000..e2ff8746d
--- /dev/null
+++ b/Bugzilla/Config/Core.pm
@@ -0,0 +1,103 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::Core;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::Core::sortkey = "00";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'maintainer',
+ type => 't',
+ default => 'THE MAINTAINER HAS NOT YET BEEN SET'
+ },
+
+ {
+ name => 'urlbase',
+ type => 't',
+ default => 'http://you-havent-visited-editparams.cgi-yet/',
+ checker => \&check_urlbase
+ },
+
+ {
+ name => 'sslbase',
+ type => 't',
+ default => '',
+ checker => \&check_sslbase
+ },
+
+ {
+ name => 'ssl',
+ type => 's',
+ choices => ['never', 'authenticated sessions', 'always'],
+ default => 'never'
+ },
+
+
+ {
+ name => 'cookiedomain',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'cookiepath',
+ type => 't',
+ default => '/'
+ },
+
+ {
+ name => 'timezone',
+ type => 't',
+ default => '',
+ },
+
+ {
+ name => 'utf8',
+ type => 'b',
+ default => '0',
+ },
+
+ {
+ name => 'shutdownhtml',
+ type => 'l',
+ default => ''
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/DependencyGraph.pm b/Bugzilla/Config/DependencyGraph.pm
new file mode 100644
index 000000000..db784c135
--- /dev/null
+++ b/Bugzilla/Config/DependencyGraph.pm
@@ -0,0 +1,52 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::DependencyGraph;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::DependencyGraph::sortkey = "06";
+
+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;
+}
+
+1;
diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm
new file mode 100644
index 000000000..e48cd4966
--- /dev/null
+++ b/Bugzilla/Config/GroupSecurity.pm
@@ -0,0 +1,81 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::GroupSecurity;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::GroupSecurity::sortkey = "07";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'makeproductgroups',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'useentrygroupdefault',
+ type => 'b',
+ default => 0
+ },
+
+ {
+ name => 'chartgroup',
+ type => 't',
+ default => 'editbugs'
+ },
+
+ {
+ name => 'insidergroup',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'timetrackinggroup',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'usevisibilitygroups',
+ type => 'b',
+ default => 0
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/L10n.pm b/Bugzilla/Config/L10n.pm
new file mode 100644
index 000000000..6fed0ed70
--- /dev/null
+++ b/Bugzilla/Config/L10n.pm
@@ -0,0 +1,78 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::L10n;
+
+use strict;
+
+use File::Spec; # for find_languages
+
+use Bugzilla::Config qw($templatedir);
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::L10n::sortkey = "08";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'languages' ,
+ extra_desc => { available_languages => find_languages() },
+ type => 't' ,
+ default => 'en' ,
+ checker => \&check_languages
+ },
+
+ {
+ name => 'defaultlanguage',
+ type => 't' ,
+ default => 'en' ,
+ checker => \&check_languages
+ } );
+ return @param_list;
+}
+
+sub find_languages {
+ my @languages = ();
+ opendir(DIR, $templatedir) || return "Can't open 'template' directory: $!";
+ foreach my $dir (readdir(DIR)) {
+ next unless $dir =~ /^([a-z-]+)$/i;
+ my $lang = $1;
+ next if($lang =~ /^CVS$/i);
+ my $deft_path = File::Spec->catdir('template', $lang, 'default');
+ my $cust_path = File::Spec->catdir('template', $lang, 'custom');
+ push(@languages, $lang) if(-d $deft_path or -d $cust_path);
+ }
+ closedir DIR;
+ return join(', ', @languages);
+}
+
+1;
diff --git a/Bugzilla/Config/LDAP.pm b/Bugzilla/Config/LDAP.pm
new file mode 100644
index 000000000..3f123243b
--- /dev/null
+++ b/Bugzilla/Config/LDAP.pm
@@ -0,0 +1,81 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::LDAP;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::LDAP::sortkey = "09";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'LDAPserver',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'LDAPbinddn',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'LDAPBaseDN',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'LDAPuidattribute',
+ type => 't',
+ default => 'uid'
+ },
+
+ {
+ name => 'LDAPmailattribute',
+ type => 't',
+ default => 'mail'
+ },
+
+ {
+ name => 'LDAPfilter',
+ type => 't',
+ default => '',
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/MTA.pm b/Bugzilla/Config/MTA.pm
new file mode 100644
index 000000000..25f70761b
--- /dev/null
+++ b/Bugzilla/Config/MTA.pm
@@ -0,0 +1,173 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::MTA;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::MTA::sortkey = "10";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'mail_delivery_method',
+ type => 's',
+ choices => $^O =~ /MSWin32/i
+ ? ['smtp', 'testfile', 'sendmail', 'none']
+ : ['sendmail', 'smtp', 'qmail', 'testfile', 'none'],
+ default => 'sendmail',
+ checker => \&check_mail_delivery_method
+ },
+
+ {
+ name => 'sendmailnow',
+ type => 'b',
+ default => 1
+ },
+
+ {
+ name => 'smtpserver',
+ type => 't',
+ default => 'localhost'
+ },
+
+ {
+ name => 'passwordmail',
+ type => 'l',
+ default => 'From: bugzilla-daemon
+To: %mailaddress%
+Subject: Your Bugzilla password.
+
+To use the wonders of Bugzilla, you can use the following:
+
+ E-mail address: %login%
+ Password: %password%
+
+ To change your password, go to:
+ %urlbase%userprefs.cgi
+'
+ },
+
+ {
+ name => 'newchangedmail',
+ type => 'l',
+ default => 'From: bugzilla-daemon
+To: %to%
+Subject: [Bug %bugid%] %neworchanged%%summary%
+%threadingmarker%
+X-Bugzilla-Reason: %reasonsheader%
+X-Bugzilla-Product: %product%
+X-Bugzilla-Component: %component%
+
+%urlbase%show_bug.cgi?id=%bugid%
+
+%diffs%
+
+--%space%
+Configure bugmail: %urlbase%userprefs.cgi?tab=email
+%reasonsbody%'
+ },
+
+ {
+ name => 'whinedays',
+ type => 't',
+ default => 7
+ },
+
+ {
+ name => 'whinemail',
+ type => 'l',
+ default => 'From: %maintainer%
+To: %email%
+Subject: Your Bugzilla buglist needs attention.
+
+[This e-mail has been automatically generated.]
+
+You have one or more bugs assigned to you in the Bugzilla
+bugsystem (%urlbase%) that require
+attention.
+
+All of these bugs are in the NEW or REOPENED state, and have not
+been touched in %whinedays% days or more. You need to take a look
+at them, and decide on an initial action.
+
+Generally, this means one of three things:
+
+(1) You decide this bug is really quick to deal with (like, it\'s INVALID),
+ and so you get rid of it immediately.
+(2) You decide the bug doesn\'t belong to you, and you reassign it to someone
+ else. (Hint: if you don\'t know who to reassign it to, make sure that
+ the Component field seems reasonable, and then use the "Reassign bug to
+ default assignee of selected component" option.)
+(3) You decide the bug belongs to you, but you can\'t solve it this moment.
+ Just use the "Accept bug" command.
+
+To get a list of all NEW/REOPENED bugs, you can use this URL (bookmark
+it if you like!):
+
+ %urlbase%buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=%userid%
+
+Or, you can use the general query page, at
+%urlbase%query.cgi
+
+Appended below are the individual URLs to get to all of your NEW bugs that
+haven\'t been touched for a week or more.
+
+You will get this message once a day until you\'ve dealt with these bugs!
+
+'
+ },
+
+ {
+ name => 'voteremovedmail',
+ type => 'l',
+ default => 'From: bugzilla-daemon
+To: %to%
+Subject: [Bug %bugid%] Some or all of your votes have been removed.
+
+Some or all of your votes have been removed from bug %bugid%.
+
+%votesoldtext%
+
+%votesnewtext%
+
+Reason: %reason%
+
+%urlbase%show_bug.cgi?id=%bugid%
+'
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/PatchViewer.pm b/Bugzilla/Config/PatchViewer.pm
new file mode 100644
index 000000000..8de04ef76
--- /dev/null
+++ b/Bugzilla/Config/PatchViewer.pm
@@ -0,0 +1,75 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::PatchViewer;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::PatchViewer::sortkey = "11";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'cvsroot',
+ type => 't',
+ default => '',
+ },
+
+ {
+ name => 'cvsroot_get',
+ type => 't',
+ default => '',
+ },
+
+ {
+ name => 'bonsai_url',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'lxr_url',
+ type => 't',
+ default => ''
+ },
+
+ {
+ name => 'lxr_root',
+ type => 't',
+ default => '',
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/Query.pm b/Bugzilla/Config/Query.pm
new file mode 100644
index 000000000..c259bea53
--- /dev/null
+++ b/Bugzilla/Config/Query.pm
@@ -0,0 +1,78 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::Query;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::Query::sortkey = "12";
+
+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
+ },
+
+ {
+ name => 'mostfreqthreshold',
+ type => 't',
+ default => '2'
+ },
+
+ {
+ name => 'mybugstemplate',
+ type => 't',
+ default => 'buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=%userid%&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1'
+ },
+
+ {
+ name => 'defaultquery',
+ type => 't',
+ default => 'bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&order=Importance&long_desc_type=substring'
+ },
+
+ {
+ name => 'quicksearch_comment_cutoff',
+ type => 't',
+ default => '4',
+ checker => \&check_numeric
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/Bugzilla/Config/ShadowDB.pm b/Bugzilla/Config/ShadowDB.pm
new file mode 100644
index 000000000..f9af4fb6d
--- /dev/null
+++ b/Bugzilla/Config/ShadowDB.pm
@@ -0,0 +1,73 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::ShadowDB;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::ShadowDB::sortkey = "13";
+
+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;
+}
+
+1;
diff --git a/Bugzilla/Config/UserMatch.pm b/Bugzilla/Config/UserMatch.pm
new file mode 100644
index 000000000..819247e99
--- /dev/null
+++ b/Bugzilla/Config/UserMatch.pm
@@ -0,0 +1,71 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Dawn Endico <endico@mozilla.org>
+# Dan Mosedale <dmose@mozilla.org>
+# Joe Robins <jmrobins@tgix.com>
+# Jacob Steenhagen <jake@bugzilla.org>
+# J. Paul Reed <preed@sigkill.com>
+# Bradley Baetz <bbaetz@student.usyd.edu.au>
+# Joseph Heenan <joseph@heenan.me.uk>
+# Erik Stambaugh <erik@dasbistro.com>
+# Frédéric Buclin <LpSolit@gmail.com>
+#
+
+package Bugzilla::Config::UserMatch;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+$Bugzilla::Config::UserMatch::sortkey = "14";
+
+sub get_param_list {
+ my $class = shift;
+ my @param_list = (
+ {
+ name => 'usemenuforusers',
+ type => 'b',
+ default => '0'
+ },
+
+ {
+ name => 'usermatchmode',
+ type => 's',
+ choices => ['off', 'wildcard', 'search'],
+ default => 'off'
+ },
+
+ {
+ name => 'maxusermatches',
+ type => 't',
+ default => '1000',
+ checker => \&check_numeric
+ },
+
+ {
+ name => 'confirmuniqueusermatch',
+ type => 'b',
+ default => 1,
+ } );
+ return @param_list;
+}
+
+1;
diff --git a/defparams.pl b/defparams.pl
deleted file mode 100644
index c7202be1a..000000000
--- a/defparams.pl
+++ /dev/null
@@ -1,1508 +0,0 @@
-# -*- Mode: perl; indent-tabs-mode: nil -*-
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Bugzilla Bug Tracking System.
-#
-# The Initial Developer of the Original Code is Netscape Communications
-# Corporation. Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s): Terry Weissman <terry@mozilla.org>
-# Dawn Endico <endico@mozilla.org>
-# Dan Mosedale <dmose@mozilla.org>
-# Joe Robins <jmrobins@tgix.com>
-# Jacob Steenhagen <jake@bugzilla.org>
-# J. Paul Reed <preed@sigkill.com>
-# Bradley Baetz <bbaetz@student.usyd.edu.au>
-# Joseph Heenan <joseph@heenan.me.uk>
-# Erik Stambaugh <erik@dasbistro.com>
-#
-
-# This file defines all the parameters that we have a GUI to edit within
-# Bugzilla.
-
-# ATTENTION!!!! THIS FILE ONLY CONTAINS THE DEFAULTS.
-# You cannot change your live settings by editing this file.
-# Only adding new parameters is done here. Once the parameter exists, you
-# must use %baseurl%/editparams.cgi from the web to edit the settings.
-
-# This file is included via |do|, mainly because of circular dependency issues
-# (such as globals.pl -> Bugzilla::Config -> this -> Bugzilla::Config)
-# which preclude compile time loading.
-
-# Those issues may go away at some point, and the contents of this file
-# moved somewhere else. Please try to avoid more dependencies from here
-# to other code
-
-# (Note that these aren't just added directly to Bugzilla::Config, because
-# the backend prefs code is separate to this...)
-
-use strict;
-use vars qw(@param_list);
-use File::Spec; # for find_languages
-use Socket;
-
-use Bugzilla::Config qw(:DEFAULT $templatedir $webdotdir);
-use Bugzilla::Util;
-use Bugzilla::Constants;
-
-# Checking functions for the various values
-# Some generic checking functions are included in Bugzilla::Config
-
-sub check_sslbase {
- my $url = shift;
- 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;
- if ($host =~ /:\d+$/) {
- return "must not contain a port.";
- }
- local *SOCK;
- my $proto = getprotobyname('tcp');
- socket(SOCK, PF_INET, SOCK_STREAM, $proto);
- my $sin = sockaddr_in(443, inet_aton($host));
- if (!connect(SOCK, $sin)) {
- return "Failed to connect to " . html_quote($host) .
- ":443, unable to enable SSL.";
- }
- }
- return "";
-}
-
-sub check_priority {
- my ($value) = (@_);
- &::GetVersionTable();
- if (lsearch(\@::legal_priority, $value) < 0) {
- return "Must be a legal priority value: one of " .
- join(", ", @::legal_priority);
- }
- return "";
-}
-
-sub check_severity {
- my ($value) = (@_);
- &::GetVersionTable();
- if (lsearch(\@::legal_severity, $value) < 0) {
- return "Must be a legal severity value: one of " .
- join(", ", @::legal_severity);
- }
- return "";
-}
-
-sub check_platform {
- my ($value) = (@_);
- &::GetVersionTable();
- if (lsearch(['', @::legal_platform], $value) < 0) {
- return "Must be empty or a legal platform value: one of " .
- join(", ", @::legal_platform);
- }
- return "";
-}
-
-sub check_opsys {
- my ($value) = (@_);
- &::GetVersionTable();
- if (lsearch(['', @::legal_opsys], $value) < 0) {
- return "Must be empty or a legal operating system value: one of " .
- join(", ", @::legal_opsys);
- }
- return "";
-}
-
-sub check_shadowdb {
- my ($value) = (@_);
- $value = trim($value);
- if ($value eq "") {
- return "";
- }
-
- if (!Param('shadowdbhost')) {
- return "You need to specify a host when using a shadow database";
- }
-
- # Can't test existence of this because ConnectToDatabase uses the param,
- # but we can't set this before testing....
- # This can really only be fixed after we can use the DBI more openly
- return "";
-}
-
-sub check_urlbase {
- my ($url) = (@_);
- if ($url !~ m:^http.*/$:) {
- return "must be a legal URL, that starts with http and ends with a slash.";
- }
- return "";
-}
-
-sub check_webdotbase {
- my ($value) = (@_);
- $value = trim($value);
- 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.";
- }
- # Check .htaccess allows access to generated images
- 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";
- }
- close HTACCESS;
- }
- }
- return "";
-}
-
-sub check_netmask {
- my ($mask) = @_;
- my $res = check_numeric($mask);
- return $res if $res;
- if ($mask < 0 || $mask > 32) {
- return "an IPv4 netmask must be between 0 and 32 bits";
- }
- # Note that if we changed the netmask from anything apart from 32, then
- # existing logincookies which aren't for a single IP won't work
- # any more. We can't know which ones they are, though, so they'll just
- # take space until they're preiodically cleared, later.
-
- return "";
-}
-
-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
- # params mutually dependent on each other.
- # This means that if someone clears the LDAP config params after setting
- # the login method as LDAP, we won't notice, but all logins will fail.
- # So don't do that.
-
- my ($list, $entry) = @_;
- for my $class (split /,\s*/, $list) {
- my $res = check_multi($class, $entry);
- return $res if $res;
- if ($class eq 'DB') {
- # No params
- } elsif ($class eq 'LDAP') {
- eval "require Net::LDAP";
- return "Error requiring Net::LDAP: '$@'" if $@;
- return "LDAP servername is missing" unless Param("LDAPserver");
- return "LDAPBaseDN is empty" unless Param("LDAPBaseDN");
- } else {
- return "Unknown user_verify_class '$class' in check_user_verify_class";
- }
- }
- return "";
-}
-
-sub check_image_converter {
- my ($value, $hash) = @_;
- if ($value == 1){
- eval "require Image::Magick";
- return "Error requiring Image::Magick: '$@'" if $@;
- }
- return "";
-}
-
-sub check_languages {
- my @languages = split /[,\s]+/, trim($_[0]);
- if(!scalar(@languages)) {
- return "You need to specify a language tag."
- }
- foreach my $language (@languages) {
- if( ! -d "$templatedir/$language/custom"
- && ! -d "$templatedir/$language/default") {
- return "The template directory for $language does not exist";
- }
- }
- return "";
-}
-
-sub find_languages {
- my @languages = ();
- opendir(DIR, $templatedir) || return "Can't open 'template' directory: $!";
- foreach my $dir (readdir(DIR)) {
- next unless $dir =~ /^([a-z-]+)$/i;
- my $lang = $1;
- next if($lang =~ /^CVS$/i);
- my $deft_path = File::Spec->catdir('template', $lang, 'default');
- my $cust_path = File::Spec->catdir('template', $lang, 'custom');
- push(@languages, $lang) if(-d $deft_path or -d $cust_path);
- }
- closedir DIR;
- return join(', ', @languages);
-}
-
-sub check_mail_delivery_method {
- my $check = check_multi(@_);
- return $check if $check;
- my $mailer = shift;
- if ($mailer eq 'sendmail' && $^O =~ /MSWin32/i) {
- # look for sendmail.exe
- return "Failed to locate " . SENDMAIL_EXE
- unless -e SENDMAIL_EXE;
- }
- return "";
-}
-
-# OK, here are the parameter definitions themselves.
-#
-# Each definition is a hash with keys:
-#
-# name - name of the param
-# desc - description of the param (for editparams.cgi)
-# type - see below
-# choices - (optional) see below
-# default - default value for the param
-# checker - (optional) checking function for validating parameter entry
-# It is called with the value of the param as the first arg and a
-# reference to the param's hash as the second argument
-#
-# The type value can be one of the following:
-#
-# t -- A short text entry field (suitable for a single line)
-# l -- A long text field (suitable for many lines)
-# b -- A boolean value (either 1 or 0)
-# m -- A list of values, with many selectable (shows up as a select box)
-# To specify the list of values, make the 'choices' key be an array
-# reference of the valid choices. The 'default' key should be an array
-# reference for the list of selected values (which must appear in the
-# first anonymous array), i.e.:
-# {
-# name => 'multiselect',
-# desc => 'A list of options, choose many',
-# type => 'm',
-# choices => [ 'a', 'b', 'c', 'd' ],
-# default => [ 'a', 'd' ],
-# checker => \&check_multi
-# }
-#
-# Here, 'a' and 'd' are the default options, and the user may pick any
-# combination of a, b, c, and d as valid options.
-#
-# &check_multi should always be used as the param verification function
-# for list (single and multiple) parameter types.
-#
-# s -- A list of values, with one selectable (shows up as a select box)
-# To specify the list of values, make the 'choices' key be an array
-# reference of the valid choices. The 'default' key should be one of
-# those values, i.e.:
-# {
-# name => 'singleselect',
-# desc => 'A list of options, choose one',
-# type => 's',
-# choices => [ 'a', 'b', 'c' ],
-# default => 'b',
-# checker => \&check_multi
-# }
-#
-# Here, 'b' is the default option, and 'a' and 'c' are other possible
-# options, but only one at a time!
-#
-# &check_multi should always be used as the param verification function
-# for list (single and multiple) parameter types.
-
-# XXXX - would be nice for doeditparams to 'know' about types s and m, and call
-# check_multi without it having to be explicitly specified here - bbaetz
-
-@param_list = (
- {
- name => 'maintainer',
- desc => 'The email address of the person who maintains this installation ' .
- 'of Bugzilla.',
- type => 't',
- default => 'THE MAINTAINER HAS NOT YET BEEN SET'
- },
-
- {
- name => 'urlbase',
- desc => 'The URL that is the common initial leading part of all Bugzilla ' .
- 'URLs.',
- type => 't',
- default => 'http://you-havent-visited-editparams.cgi-yet/',
- checker => \&check_urlbase
- },
-
- {
- name => 'sslbase',
- desc => 'The URL that is the common initial leading part of all HTTPS ' .
- '(SSL) Bugzilla URLs.',
- type => 't',
- default => '',
- checker => \&check_sslbase
- },
-
- {
- name => 'ssl',
- desc => 'Controls when Bugzilla should enforce sessions to use HTTPS by ' .
- 'using <tt>sslbase</tt>.',
- type => 's',
- choices => ['never', 'authenticated sessions', 'always'],
- default => 'never'
- },
-
- {
- name => 'languages' ,
- desc => 'A comma-separated list of RFC 1766 language tags. These ' .
- 'identify the languages in which you wish Bugzilla output ' .
- 'to be displayed. Note that you must install the appropriate ' .
- 'language pack before adding a language to this Param. The ' .
- 'language used is the one in this list with the highest ' .
- 'q-value in the user\'s Accept-Language header.<br>' .
- 'Available languages: ' . find_languages() ,
- type => 't' ,
- default => 'en' ,
- checker => \&check_languages
- },
-
- {
- name => 'defaultlanguage',
- desc => 'The UI language Bugzilla falls back on if no suitable ' .
- 'language is found in the user\'s Accept-Language header.' ,
- type => 't' ,
- default => 'en' ,
- checker => \&check_languages
- },
-
- {
- name => 'utf8',
- desc => 'Use UTF-8 (Unicode) encoding for all text in Bugzilla. New ' .
- 'installations should set this to true to avoid character encoding ' .
- 'problems. Existing databases should set this to true only after ' .
- 'the data has been converted from existing legacy character ' .
- 'encodings to UTF-8.',
- type => 'b',
- default => '0',
- },
-
- {
- name => 'cookiedomain',
- desc => 'The domain for Bugzilla cookies. Normally blank. ' .
- 'If your website is at "www.foo.com", setting this to ' .
- '".foo.com" will also allow bar.foo.com to access ' .
- 'Bugzilla cookies. This is useful if you have more than ' .
- 'one hostname pointing at the same web server, and you ' .
- 'want them to share the Bugzilla cookie.',
- type => 't',
- default => ''
- },
- {
- name => 'cookiepath',
- desc => 'Path, relative to your web document root, to which to restrict ' .
- 'Bugzilla cookies. Normally this is the URI portion of your URL ' .
- 'base. Begin with a / (single slash mark). For instance, if ' .
- 'Bugzilla serves from http://www.somedomain.com/bugzilla/, set ' .
- 'this parameter to /bugzilla/ . Setting it to / will allow ' .
- 'all sites served by this web server or virtual host to read ' .
- 'Bugzilla cookies.',
- type => 't',
- default => '/'
- },
-
- {
- name => 'timezone',
- desc => 'The timezone that your database server lives in. If set to "", ' .
- 'then the timezone won\'t be displayed with the timestamps.',
- type => 't',
- default => '',
- },
-
- {
- name => 'quip_list_entry_control',
- desc => 'Controls how easily users can add entries to the quip list.' .
- '<ul><li>open - Users may freely add to the quip list, and ' .
- 'their entries will immediately be available for viewing.</li>' .
- '<li>moderated - quips can be entered, but need to be approved ' .
- 'by an admin before they will be shown</li><li>closed - no new ' .
- 'additions to the quips list are allowed.</li></ul>',
- type => 's',
- choices => ['open', 'moderated', 'closed'],
- default => 'open',
- checker => \&check_multi
- },
-
- {
- name => 'useclassification',
- desc => 'If this is on, Bugzilla will associate each product with a ' .
- 'specific classification. But you must have "editclassification" ' .
- 'permissions enabled in order to edit classifications',
- type => 'b',
- default => 0
- },
-
- {
- name => 'showallproducts',
- desc => 'If this is on and useclassification is set, Bugzilla will add a' .
- '"All" link in the "New Bug" page to list all available products',
- type => 'b',
- default => 0
- },
-
- {
- name => 'makeproductgroups',
- desc => 'If this is on, Bugzilla will associate a bug group with each ' .
- 'product in the database, and use it for querying bugs.',
- type => 'b',
- default => 0
- },
-
- {
- name => 'useentrygroupdefault',
- desc => 'If this is on, Bugzilla will use product bug groups by default ' .
- 'to restrict who can enter bugs. If this is on, users can see ' .
- 'any product to which they have entry access in search menus. ' .
- 'If this is off, users can see any product to which they have not ' .
- 'been excluded by a mandatory restriction.',
- type => 'b',
- default => 0
- },
-
- {
- name => 'shadowdbhost',
- desc => 'The host the shadow database is on.',
- type => 't',
- default => '',
- },
-
- {
- name => 'shadowdbport',
- desc => 'The port the shadow database is on. Ignored if ' .
- '<tt>shadowdbhost</tt> is blank. Note: if the host is the local ' .
- 'machine, then MySQL will ignore this setting, and you must ' .
- 'specify a socket below.',
- type => 't',
- default => '3306',
- checker => \&check_numeric,
- },
-
- {
- name => 'shadowdbsock',
- desc => 'The socket used to connect to the shadow database, if the host ' .
- 'is the local machine. This setting is required because MySQL ' .
- 'ignores the port specified by the client and connects using ' .
- 'its compiled-in socket path (on unix machines) when connecting ' .
- 'from a client to a local server. If you leave this blank, and ' .
- 'have the database on localhost, then the <tt>shadowdbport</tt> ' .
- 'will be ignored.',
- 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',
- desc => 'If non-empty, then this is the name of another database in ' .
- 'which Bugzilla will use as a read-only copy of everything. ' .
- 'This is done so that long slow read-only operations can be used ' .
- 'against this db, and not lock up things for everyone else. This ' .
- 'database is on the <tt>shadowdbhost</tt>, and must exist. ' .
- 'Bugzilla does not update it, if you use this parameter, then ' .
- 'you need to set up replication for your database',
- type => 't',
- default => '',
- checker => \&check_shadowdb
- },
-
- {
- name => 'LDAPserver',
- desc => 'The name (and optionally port) of your LDAP server. (e.g. ' .
- 'ldap.company.com, or ldap.company.com:portnum)',
- type => 't',
- default => ''
- },
-
- {
- name => 'LDAPbinddn',
- desc => 'If your LDAP server requires that you use a binddn and password ' .
- 'instead of binding anonymously, enter it here ' .
- '(e.g. cn=default,cn=user:password). ' .
- 'Leave this empty for the normal case of an anonymous bind.',
- type => 't',
- default => ''
- },
-
- {
- name => 'LDAPBaseDN',
- desc => 'The BaseDN for authenticating users against. (e.g. ' .
- '"ou=People,o=Company")',
- type => 't',
- default => ''
- },
-
- {
- name => 'LDAPuidattribute',
- desc => 'The name of the attribute containing the user\'s login name.',
- type => 't',
- default => 'uid'
- },
-
- {
- name => 'LDAPmailattribute',
- desc => 'The name of the attribute of a user in your directory that ' .
- 'contains the email address.',
- type => 't',
- default => 'mail'
- },
-
- {
- name => 'LDAPfilter',
- desc => 'LDAP filter to AND with the <tt>LDAPuidattribute</tt> for ' .
- 'filtering the list of valid users.',
- type => 't',
- default => '',
- },
-
- {
- name => 'auth_env_id',
- desc => 'Environment variable used by external authentication system ' .
- 'to store a unique identifier for each user. Leave it blank ' .
- 'if there isn\'t one or if this method of authentication ' .
- 'is not being used.',
- type => 't',
- default => '',
- },
-
- {
- name => 'auth_env_email',
- desc => 'Environment variable used by external authentication system ' .
- 'to store each user\'s email address. This is a required ' .
- 'field for environmental authentication. Leave it blank ' .
- 'if you are not going to use this feature.',
- type => 't',
- default => '',
- },
-
- {
- name => 'auth_env_realname',
- desc => 'Environment variable used by external authentication system ' .
- 'to store the user\'s real name. Leave it blank if there ' .
- 'isn\'t one or if this method of authentication is not being ' .
- 'used.',
- 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',
- desc => 'Mechanism(s) to be used for gathering a user\'s login information.
- <add>
- More than one may be selected. If the first one returns nothing,
- the second is tried, and so on.<br />
- The types are:
- <dl>
- <dt>CGI</dt>
- <dd>
- Asks for username and password via CGI form interface.
- </dd>
- <dt>Env</dt>
- <dd>
- Info for a pre-authenticated user is passed in system
- environment variables.
- </dd>
- </dl>',
- type => 's',
- choices => [ 'CGI', 'Env', 'Env,CGI' ],
- default => 'CGI',
- checker => \&check_multi
- },
-
- {
- name => 'user_verify_class',
- desc => 'Mechanism(s) to be used for verifying (authenticating) information
- gathered by user_info_class.
- More than one may be selected. If the first one cannot find the
- user, the second is tried, and so on.<br />
- The types are:
- <dl>
- <dt>DB</dt>
- <dd>
- Bugzilla\'s built-in authentication. This is the most common
- choice.
- </dd>
- <dt>LDAP</dt>
- <dd>
- LDAP authentication using an LDAP server. This method is
- experimental; please see the Bugzilla documentation for more
- information. Using this method requires additional parameters
- to be set above.
- </dd>
- </dl>',
- type => 's',
- choices => [ 'DB', 'LDAP', 'DB,LDAP', 'LDAP,DB' ],
- default => 'DB',
- checker => \&check_user_verify_class
- },
-
- {
- name => 'rememberlogin',
- desc => 'Controls management of session cookies
- <ul>
- <li>on - Session cookies never expire (the user has to login only
- once per browser).</li>
- <li>off - Session cookies last until the users session ends (the user
- will have to login in each new browser session).</li>
- <li>defaulton/defaultoff - Default behavior as described
- above, but user can choose whether bugzilla will remember his
- login or not.</li>
- </ul>',
- type => 's',
- choices => ['on', 'defaulton', 'defaultoff', 'off'],
- default => 'on',
- checker => \&check_multi
- },
-
- {
- name => 'mostfreqthreshold',
- desc => 'The minimum number of duplicates a bug needs to show up on the ' .
- '<a href="duplicates.cgi">most frequently reported bugs page</a>. ' .
- 'If you have a large database and this page takes a long time to ' .
- 'load, try increasing this number.',
- type => 't',
- default => '2'
- },
-
- {
- name => 'mybugstemplate',
- desc => 'This is the URL to use to bring up a simple \'all of my bugs\' ' .
- 'list for a user. %userid% will get replaced with the login ' .
- 'name of a user.',
- type => 't',
- default => 'buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=%userid%&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1'
- },
-
- {
- name => 'shutdownhtml',
- desc => 'If this field is non-empty, then Bugzilla will be completely ' .
- 'disabled and this text will be displayed instead of all the ' .
- 'Bugzilla pages.',
- type => 'l',
- default => ''
- },
-
- {
- name => 'mail_delivery_method',
- desc => 'Defines how email is sent, or if it is sent at all.<br><ul>' .
- '<li>\'sendmail\', \'smtp\' and \'qmail\' are all MTAs. ' .
- 'You need to install a third-party sendmail replacement if ' .
- 'you want to use sendmail on Windows.' .
- '<li>\'testfile\' is useful for debugging: all email is stored ' .
- 'in data/mailer.testfile instead of being sent. For more ' .
- 'information, see the Mail::Mailer manual.</li>' .
- '<li>\'none\' will completely disable email. Bugzilla continues ' .
- 'to act as though it is sending mail, but nothing is sent or ' .
- 'stored.</li></ul>' ,
- type => 's',
- choices => $^O =~ /MSWin32/i
- ? ['smtp', 'testfile', 'sendmail', 'none']
- : ['sendmail', 'smtp', 'qmail', 'testfile', 'none'],
- default => 'sendmail',
- checker => \&check_mail_delivery_method
- },
-
- {
- name => 'sendmailnow',
- desc => 'Sites using anything older than version 8.12 of \'sendmail\' ' .
- 'can achieve a significant performance increase in the ' .
- 'UI -- at the cost of delaying the sending of mail -- by ' .
- 'disabling this parameter. Sites using \'sendmail\' 8.12 or ' .
- 'higher should leave this on, as they will see no benefit from ' .
- 'turning it off. Sites using an MTA other than \'sendmail\' ' .
- '*must* leave it on, or no bug mail will be sent.',
- type => 'b',
- default => 1
- },
-
- {
- name => 'smtpserver',
- desc => 'The SMTP server address (if using SMTP for mail delivery).',
- type => 't',
- default => 'localhost'
- },
-
- {
- name => 'passwordmail',
- desc => 'The email that gets sent to people to tell them their password.' .
- 'Within this text, %mailaddress% gets replaced by the person\'s ' .
- 'email address, %login% gets replaced by the person\'s login ' .
- '(usually the same thing), and %password% gets replaced by their ' .
- 'password. %<i>anythingelse</i>% gets replaced by the ' .
- 'definition of that parameter (as defined on this page).',
- type => 'l',
- default => 'From: bugzilla-daemon
-To: %mailaddress%
-Subject: Your Bugzilla password.
-
-To use the wonders of Bugzilla, you can use the following:
-
- E-mail address: %login%
- Password: %password%
-
- To change your password, go to:
- %urlbase%userprefs.cgi
-'
- },
-
- {
- name => 'newchangedmail',
- desc => 'The email that gets sent to people when a bug changes. Within ' .
- 'this text, %to% gets replaced with the e-mail address of the ' .
- 'person receiving the mail. %bugid% gets replaced by the bug ' .
- 'number. %diffs% gets replaced with what\'s changed. ' .
- '%neworchanged% is "New:" if this mail is reporting a new bug or ' .
- 'empty if changes were made to an existing one. %summary% gets ' .
- 'replaced by the summary of this bug. %reasonsheader% is ' .
- 'replaced by an abbreviated list of reasons why the user is ' .
- 'getting the email, suitable for use in an email header (such ' .
- 'as X-Bugzilla-Reason). %reasonsbody% is replaced by text that ' .
- 'explains why the user is getting the email in more user ' .
- 'friendly text than %reasonsheader%. ' .
- '%threadingmarker% will become either a Message-ID line (for ' .
- 'new-bug messages) or a In-Reply-To line (for bug-change ' .
- 'messages). ' .
- '%<i>anythingelse</i>% gets ' .
- 'replaced by the definition of that parameter (as defined on ' .
- 'this page).',
- type => 'l',
- default => 'From: bugzilla-daemon
-To: %to%
-Subject: [Bug %bugid%] %neworchanged%%summary%
-%threadingmarker%
-X-Bugzilla-Reason: %reasonsheader%
-X-Bugzilla-Product: %product%
-X-Bugzilla-Component: %component%
-
-%urlbase%show_bug.cgi?id=%bugid%
-
-%diffs%
-
---%space%
-Configure bugmail: %urlbase%userprefs.cgi?tab=email
-%reasonsbody%'
- },
-
- {
- name => 'whinedays',
- desc => q{The number of days that we'll let a bug sit untouched in a NEW
- state before our cronjob will whine at the owner.<br>
- Set to 0 to disable whining.},
- type => 't',
- default => 7
- },
-
- {
- name => 'whinemail',
- desc => 'The email that gets sent to anyone who has a NEW or REOPENED ' .
- 'bug that hasn\'t been touched for more than <b>whinedays</b>. ' .
- 'Within this text, %email% gets replaced by the offender\'s ' .
- 'email address. %userid% gets replaced by the offender\'s ' .
- 'bugzilla login (which, in most installations, is the same as ' .
- 'the email address.) %<i>anythingelse</i>% gets replaced by the ' .
- 'definition of that parameter (as defined on this page).<p> It ' .
- 'is a good idea to make sure this message has a valid From: ' .
- 'address, so that if the mail bounces, a real person can know '.
- 'that there are bugs assigned to an invalid address.',
- type => 'l',
- default => 'From: %maintainer%
-To: %email%
-Subject: Your Bugzilla buglist needs attention.
-
-[This e-mail has been automatically generated.]
-
-You have one or more bugs assigned to you in the Bugzilla
-bugsystem (%urlbase%) that require
-attention.
-
-All of these bugs are in the NEW or REOPENED state, and have not
-been touched in %whinedays% days or more. You need to take a look
-at them, and decide on an initial action.
-
-Generally, this means one of three things:
-
-(1) You decide this bug is really quick to deal with (like, it\'s INVALID),
- and so you get rid of it immediately.
-(2) You decide the bug doesn\'t belong to you, and you reassign it to someone
- else. (Hint: if you don\'t know who to reassign it to, make sure that
- the Component field seems reasonable, and then use the "Reassign bug to
- default assignee of selected component" option.)
-(3) You decide the bug belongs to you, but you can\'t solve it this moment.
- Just use the "Accept bug" command.
-
-To get a list of all NEW/REOPENED bugs, you can use this URL (bookmark
-it if you like!):
-
- %urlbase%buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=%userid%
-
-Or, you can use the general query page, at
-%urlbase%query.cgi
-
-Appended below are the individual URLs to get to all of your NEW bugs that
-haven\'t been touched for a week or more.
-
-You will get this message once a day until you\'ve dealt with these bugs!
-
-'
- },
-
- {
- name => 'defaultquery',
- desc => 'This is the default query that initially comes up when you ' .
- 'access the advanced query page. It\'s in URL parameter ' .
- 'format, which makes it hard to read. Sorry!',
- type => 't',
- default => 'bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&order=Importance&long_desc_type=substring'
- },
-
- {
- name => 'letsubmitterchoosepriority',
- desc => 'If this is on, then people submitting bugs can choose an ' .
- 'initial priority for that bug. If off, then all bugs initially ' .
- 'have the default priority selected below.',
- type => 'b',
- default => 1
- },
-
- {
- name => 'defaultpriority',
- desc => 'This is the priority that newly entered bugs are set to.',
- type => 't',
- default => 'P2',
- checker => \&check_priority
- },
-
- {
- name => 'defaultseverity',
- desc => 'This is the severity that newly entered bugs are set to.',
- type => 't',
- default => 'normal',
- checker => \&check_severity
- },
-
- {
- name => 'defaultplatform',
- desc => 'This is the platform that is preselected on the bug '.
- 'entry form.<br>'.
- 'You can leave this empty: '.
- 'Bugzilla will then use the platform that the browser '.
- 'reports to be running on as the default.',
- type => 't',
- default => '',
- checker => \&check_platform
- },
-
- {
- name => 'defaultopsys',
- desc => 'This is the operating system that is preselected on the bug '.
- 'entry form.<br>'.
- 'You can leave this empty: '.
- 'Bugzilla will then use the operating system that the browser '.
- 'reports to be running on as the default.',
- type => 't',
- default => '',
- checker => \&check_opsys
- },
-
- {
- name => 'usetargetmilestone',
- desc => 'Do you wish to use the Target Milestone field?',
- type => 'b',
- default => 0
- },
-
- {
- name => 'letsubmitterchoosemilestone',
- desc => 'If this is on, then people submitting bugs can choose the ' .
- 'Target Milestone for that bug. If off, then all bugs initially ' .
- 'have the default milestone for the product being filed in.',
- type => 'b',
- default => 1
- },
-
- {
- name => 'musthavemilestoneonaccept',
- desc => 'If you are using Target Milestone, do you want to require that ' .
- 'the milestone be set in order for a user to ACCEPT a bug?',
- type => 'b',
- default => 0
- },
-
- {
- name => 'useqacontact',
- desc => 'Do you wish to use the QA Contact field?',
- type => 'b',
- default => 0
- },
-
- {
- name => 'usestatuswhiteboard',
- desc => 'Do you wish to use the Status Whiteboard field?',
- type => 'b',
- default => 0
- },
-
- {
- name => 'usevotes',
- desc => 'Do you wish to allow users to vote for bugs? Note that in order ' .
- 'for this to be effective, you will have to change the maximum ' .
- 'votes allowed in a product to be non-zero in ' .
- '<a href="editproducts.cgi">the product edit page</a>.',
- type => 'b',
- default => 1
- },
-
- {
- name => 'usebugaliases',
- desc => 'Do you wish to use bug aliases, which allow you to assign bugs ' .
- 'an easy-to-remember name by which you can refer to them?',
- type => 'b',
- default => 0
- },
-
- {
- name => 'usevisibilitygroups',
- desc => 'Do you wish to restrict visibility of users to members of ' .
- 'specific groups?',
- type => 'b',
- default => 0
- },
-
- {
- name => 'webdotbase',
- desc => 'It is possible to show graphs of dependent bugs. You may set ' .
- 'this parameter to any of the following:
- <ul>
- <li>A complete file path to \'dot\' (part of <a
- href="http://www.graphviz.org">GraphViz</a>) will generate the graphs
- locally.</li>
- <li>A URL prefix pointing to an installation of the <a
- href="http://www.research.att.com/~north/cgi-bin/webdot.cgi">webdot
- package</a> will generate the graphs remotely.</li>
- <li>A blank value will disable dependency graphing.</li>
- </ul>
- The default value is a publicly-accessible webdot server. If you change
- this value, make certain that the webdot server can read files from your
- webdot directory. On Apache you do this by editing the .htaccess file,
- for other systems the needed measures may vary. You can run checksetup.pl
- to recreate the .htaccess file if it has been lost.',
- type => 't',
- default => 'http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%',
- checker => \&check_webdotbase
- },
-
- {
- name => 'emailregexp',
- desc => 'This defines the regexp to use for legal email addresses. The ' .
- 'default tries to match fully qualified email addresses. Another ' .
- 'popular value to put here is <tt>^[^@]+$</tt>, which means ' .
- '"local usernames, no @ allowed."',
- type => 't',
- default => q:^[\\w\\.\\+\\-=]+@[\\w\\.\\-]+\\.[\\w\\-]+$:,
- checker => \&check_regexp
- },
-
- {
- name => 'emailregexpdesc',
- desc => 'This describes in English words what kinds of legal addresses ' .
- 'are allowed by the <tt>emailregexp</tt> param.',
- type => 'l',
- default => 'A legal address must contain exactly one \'@\', and at least ' .
- 'one \'.\' after the @.'
- },
-
- {
- name => 'emailsuffix',
- desc => 'This is a string to append to any email addresses when actually ' .
- 'sending mail to that address. It is useful if you have changed ' .
- 'the <tt>emailregexp</tt> param to only allow local usernames, ' .
- 'but you want the mail to be delivered to username@my.local.hostname.',
- type => 't',
- default => ''
- },
-
- {
- name => 'createemailregexp',
- desc => 'This defines the regexp to use for email addresses that are ' .
- 'permitted to self-register using a "New Account" feature. The ' .
- 'default (.*) permits any account matching the emailregexp ' .
- 'to be created. If this parameter is left blank, no users ' .
- 'will be permitted to create their own accounts and all accounts ' .
- 'will have to be created by an administrator',
- type => 't',
- default => q:.*:,
- checker => \&check_regexp
- },
-
- {
- name => 'voteremovedmail',
- desc => 'This is a mail message to send to anyone who gets a vote removed ' .
- 'from a bug for any reason. %to% gets replaced by the person who ' .
- 'used to be voting for this bug. %bugid% gets replaced by the ' .
- 'bug number. %reason% gets replaced by a short reason describing ' .
- 'why the vote(s) were removed. %votesremoved%, %votesold% and ' .
- '%votesnew% is the number of votes removed, before and after ' .
- 'respectively. %votesremovedtext%, %votesoldtext% and ' .
- '%votesnewtext% are these as sentences, e.g. "You had 2 votes on ' .
- 'this bug." %count% is also supported for backwards ' .
- 'compatibility. %<i>anythingelse</i>% gets replaced by the ' .
- 'definition of that parameter (as defined on this page).',
- type => 'l',
- default => 'From: bugzilla-daemon
-To: %to%
-Subject: [Bug %bugid%] Some or all of your votes have been removed.
-
-Some or all of your votes have been removed from bug %bugid%.
-
-%votesoldtext%
-
-%votesnewtext%
-
-Reason: %reason%
-
-%urlbase%show_bug.cgi?id=%bugid%
-'
- },
-
- {
- name => 'allowbugdeletion',
- desc => 'The pages to edit products and components and versions can delete ' .
- 'all associated bugs when you delete a product (or component or ' .
- 'version). Since that is a pretty scary idea, you have to turn on ' .
- 'this option before any such deletions will ever happen.',
- type => 'b',
- default => 0
- },
-
- {
- name => 'allowemailchange',
- desc => 'Users can change their own email address through the preferences. ' .
- 'Note that the change is validated by emailing both addresses, so ' .
- 'switching this option on will not let users use an invalid address.',
- type => 'b',
- default => 0
- },
-
- {
- name => 'allowuserdeletion',
- desc => q{The user editing pages are capable of letting you delete user
- accounts.
- Bugzilla will issue a warning in case you'd run into
- inconsistencies when you're about to do so,
- but such deletions remain kinda scary.
- So, you have to turn on this option before any such deletions
- will ever happen.},
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentoncreate',
- desc => 'If this option is on, the user needs to enter a description ' .
- 'when entering a new bug',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonaccept',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'he accepts the bug',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonclearresolution',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug\'s resolution is cleared',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonconfirm',
- desc => 'If this option is on, the user needs to enter a short comment ' .
- 'when confirming a bug',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonresolve',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug is resolved',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonreassign',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug is reassigned',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonreassignbycomponent',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug is reassigned by component',
- type => 'b',
- default => 0
- },
- {
- name => 'commentonreopen',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug is reopened',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonverify',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug is verified',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonclose',
- desc => 'If this option is on, the user needs to enter a short comment if ' .
- 'the bug is closed',
- type => 'b',
- default => 0
- },
-
- {
- name => 'commentonduplicate',
- desc => 'If this option is on, the user needs to enter a short comment ' .
- 'if the bug is marked as duplicate',
- type => 'b',
- default => 0
- },
-
- {
- name => 'supportwatchers',
- desc => 'Support one user watching (ie getting copies of all related ' .
- 'email about) another\'s bugs. Useful for people going on ' .
- 'vacation, and QA folks watching particular developers\' bugs',
- type => 'b',
- default => 0
- },
-
- {
- name => 'move-enabled',
- desc => 'If this is on, Bugzilla will allow certain people to move bugs ' .
- 'to the defined database.',
- type => 'b',
- default => 0
- },
-
- {
- name => 'move-button-text',
- desc => 'The text written on the Move button. Explain where the bug is ' .
- 'being moved to.',
- type => 't',
- default => 'Move To Bugscape'
- },
-
- {
- name => 'move-to-url',
- desc => 'The URL of the database we allow some of our bugs to be moved to.',
- type => 't',
- default => ''
- },
-
- {
- name => 'move-to-address',
- desc => 'To move bugs, an email is sent to the target database. This is ' .
- 'the email address that database uses to listen for incoming bugs.',
- type => 't',
- default => 'bugzilla-import'
- },
-
- {
- name => 'moved-from-address',
- desc => 'To move bugs, an email is sent to the target database. This is ' .
- 'the email address from which this mail, and error messages are ' .
- 'sent.',
- type => 't',
- default => 'bugzilla-admin'
- },
-
- {
- name => 'movers',
- desc => 'A list of people with permission to move bugs and reopen moved ' .
- 'bugs (in case the move operation fails).',
- type => 't',
- default => ''
- },
-
- {
- name => 'moved-default-product',
- desc => 'Bugs moved from other databases to here are assigned to this ' .
- 'product.',
- type => 't',
- default => ''
- },
-
- {
- name => 'moved-default-component',
- desc => 'Bugs moved from other databases to here are assigned to this ' .
- 'component.',
- type => 't',
- default => ''
- },
-
- # The maximum size (in bytes) for patches and non-patch attachments.
- # The default limit is 1000KB, which is 24KB less than mysql's default
- # maximum packet size (which determines how much data can be sent in a
- # single mysql packet and thus how much data can be inserted into the
- # database) to provide breathing space for the data in other fields of
- # the attachment record as well as any mysql packet overhead (I don't
- # know of any, but I suspect there may be some.)
-
- {
- name => 'maxpatchsize',
- desc => 'The maximum size (in kilobytes) of patches. Bugzilla will not ' .
- 'accept patches greater than this number of kilobytes in size.' .
- 'To accept patches of any size (subject to the limitations of ' .
- 'your server software), set this value to zero.',
- type => 't',
- default => '1000',
- checker => \&check_numeric
- },
-
- {
- name => 'maxattachmentsize',
- desc => 'The maximum size (in kilobytes) of non-patch attachments. ' .
- 'Bugzilla will not accept attachments greater than this number' .
- 'of kilobytes in size. To accept attachments of any size ' .
- '(subject to the limitations of your server software), set this ' .
- 'value to zero.',
- type => 't',
- default => '1000',
- checker => \&check_numeric
- },
-
- {
- name => 'maxlocalattachment',
- desc => 'The maximum size (in Megabytes) of attachments identified by ' .
- 'the user as "Big Files" to be stored locally on the webserver. ' .
- 'If set to zero, attachments will never be kept on the local ' .
- 'filesystem.',
- type => 't',
- default => '0',
- checker => \&check_numeric
- },
-
- {
- name => 'convert_uncompressed_images',
- desc => 'If this option is on, attachments with content type image/bmp ' .
- 'will be converted to image/png and compressed before uploading to'.
- 'the database to conserve disk space.',
- type => 'b',
- default => 0,
- checker => \&check_image_converter
- },
-
- {
- name => 'chartgroup',
- desc => 'The name of the group of users who can use the "New Charts" ' .
- 'feature. Administrators should ensure that the public categories ' .
- 'and series definitions do not divulge confidential information ' .
- 'before enabling this for an untrusted population. If left blank, ' .
- 'no users will be able to use New Charts.',
- type => 't',
- default => 'editbugs'
- },
-
- {
- name => 'insidergroup',
- desc => 'The name of the group of users who can see/change private ' .
- 'comments and attachments.',
- type => 't',
- default => ''
- },
-
- {
- name => 'timetrackinggroup',
- desc => 'The name of the group of users who can see/change time tracking ' .
- 'information.',
- type => 't',
- default => ''
- },
-
- {
- name => 'loginnetmask',
- desc => 'The number of bits for the netmask used if a user chooses to ' .
- 'allow a login to be valid for more than a single IP. Setting ' .
- 'this to 32 disables this feature.<br>' .
- 'Note that enabling this may decrease the security of your system.',
- type => 't',
- default => '32',
- checker => \&check_netmask
- },
-
- {
- name => 'requirelogin',
- desc => 'If this option is set, all access to the system beyond the ' .
- ' front page will require a login. No anonymous users will ' .
- ' be permitted.',
- type => 'b',
- default => '0'
- },
-
- {
- name => 'usemenuforusers',
- desc => 'If this option is set, a popup menu will be used where a user' .
- ' needs to be selected. This option should not be enabled on' .
- ' sites where there are a large number of users.',
- type => 'b',
- default => '0'
- },
-
- {
- name => 'usermatchmode',
- desc => 'Allow match strings to be entered for user names when entering ' .
- 'and editing bugs. <p>' .
- '"off" disables matching,<br> ' .
- '"wildcard" allows only wildcards,<br> ' .
- 'and "search" allows both wildcards and substring (freetext) ' .
- 'matches.',
- type => 's',
- choices => ['off', 'wildcard', 'search'],
- default => 'off'
- },
-
- {
- name => 'maxusermatches',
- desc => 'Search for no more than this many matches. <br>'.
- 'If set to "1", no users will be displayed on ambiguous matches. '.
- 'This is useful for user privacy purposes. <br>'.
- 'A value of zero means no limit.',
- type => 't',
- default => '1000',
- checker => \&check_numeric
- },
-
- {
- name => 'confirmuniqueusermatch',
- desc => 'Whether a confirmation screen should be displayed when only ' .
- 'one user matches a search entry',
- type => 'b',
- default => 1,
- },
-
- {
- name => 'quicksearch_comment_cutoff',
- desc => q{The maximum number of search terms for a QuickSearch to search
- comments.
- If the QuickSearch query contains more terms than this value,
- QuickSearch will not search comments.},
- type => 't',
- default => '4',
- checker => \&check_numeric
- },
-
-# Added for Patch Viewer stuff (attachment.cgi?action=diff)
- {
- name => 'cvsroot',
- desc => 'The <a href="http://www.cvshome.org">CVS</a> root that most ' .
- 'users of your system will be using for "cvs diff". Used in ' .
- 'Patch Viewer ("Diff" option on patches) to figure out where ' .
- 'patches are rooted even if users did the "cvs diff" from ' .
- 'different places in the directory structure. (NOTE: if your ' .
- 'CVS repository is remote and requires a password, you must ' .
- 'either ensure the Bugzilla user has done a "cvs login" or ' .
- 'specify the password ' .
- '<a href="http://www.cvshome.org/docs/manual/cvs_2.html#SEC26">as ' .
- 'part of the CVS root.</a>) Leave this blank if you have no ' .
- 'CVS repository.',
- type => 't',
- default => '',
- },
-
- {
- name => 'cvsroot_get',
- desc => 'The CVS root Bugzilla will be using to get patches from. ' .
- 'Some installations may want to mirror their CVS repository on ' .
- 'the Bugzilla server or even have it on that same server, and ' .
- 'thus the repository can be the local file system (and much ' .
- 'faster). Make this the same as cvsroot if you don\'t ' .
- 'understand what this is (if cvsroot is blank, make this blank ' .
- 'too).',
- type => 't',
- default => '',
- },
-
- {
- name => 'bonsai_url',
- desc => 'The URL to a ' .
- '<a href="http://www.mozilla.org/bonsai.html">Bonsai</a> ' .
- 'server containing information about your CVS repository. ' .
- 'Patch Viewer will use this information to create links to ' .
- 'bonsai\'s blame for each section of a patch (it will append ' .
- '"/cvsblame.cgi?..." to this url). Leave this blank if you ' .
- 'don\'t understand what this is.',
- type => 't',
- default => ''
- },
-
- {
- name => 'lxr_url',
- desc => 'The URL to an ' .
- '<a href="http://sourceforge.net/projects/lxr">LXR</a> server ' .
- 'that indexes your CVS repository. Patch Viewer will use this ' .
- 'information to create links to LXR for each file in a patch. ' .
- 'Leave this blank if you don\'t understand what this is.',
- type => 't',
- default => ''
- },
-
- {
- name => 'lxr_root',
- desc => 'Some LXR installations do not index the CVS repository from ' .
- 'the root--' .
- '<a href="http://lxr.mozilla.org/mozilla">Mozilla\'s</a>, for ' .
- 'example, starts indexing under <code>mozilla/</code>. This ' .
- 'means URLs are relative to that extra path under the root. ' .
- 'Enter this if you have a similar situation. Leave it blank ' .
- 'if you don\'t know what this is.',
- type => 't',
- default => '',
- },
-
- {
- name => 'noresolveonopenblockers',
- desc => 'Don\'t allow bugs to be resolved as fixed if they have unresolved dependencies.',
- type => 'b',
- default => 0,
- },
-
-);
-1;
-
diff --git a/doeditparams.cgi b/doeditparams.cgi
deleted file mode 100755
index 8d69f56bc..000000000
--- a/doeditparams.cgi
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/perl -wT
-# -*- Mode: perl; indent-tabs-mode: nil -*-
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Bugzilla Bug Tracking System.
-#
-# The Initial Developer of the Original Code is Netscape Communications
-# Corporation. Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s): Terry Weissman <terry@mozilla.org>
-# J. Paul Reed <preed@sigkill.com>
-
-use strict;
-
-use lib qw(.);
-
-use Bugzilla;
-use Bugzilla::Constants;
-use Bugzilla::Config qw(:DEFAULT :admin $datadir);
-
-require "globals.pl";
-
-my $user = Bugzilla->login(LOGIN_REQUIRED);
-
-my $cgi = Bugzilla->cgi;
-my $template = Bugzilla->template;
-
-print $cgi->header();
-
-$user->in_group('tweakparams')
- || ThrowUserError("auth_failure", {group => "tweakparams",
- action => "modify",
- object => "parameters"});
-
-$template->put_header("Saving new parameters");
-
-my $howto = "";
-
-foreach my $i (GetParamList()) {
- my $name = $i->{'name'};
- my $value = $cgi->param($name);
- if (defined $cgi->param("reset-$name")) {
- $value = $i->{'default'};
- } else {
- if ($i->{'type'} eq 'm') {
- # This simplifies the code below
- $value = [ $cgi->param($name) ];
- } else {
- # Get rid of windows/mac-style line endings.
- $value =~ s/\r\n?/\n/g;
-
- # assume single linefeed is an empty string
- $value =~ s/^\n$//;
- }
- }
- my $changed;
- if ($i->{'type'} eq 'm') {
- my @old = sort @{Param($name)};
- my @new = sort @$value;
- if (scalar(@old) != scalar(@new)) {
- $changed = 1;
- } else {
- $changed = 0; # Assume not changed...
- for (my $cnt = 0; $cnt < scalar(@old); ++$cnt) {
- if ($old[$cnt] ne $new[$cnt]) {
- # entry is different, therefore changed
- $changed = 1;
- last;
- }
- }
- }
- } else {
- $changed = ($value eq Param($name) ? 0 : 1);
- }
- if ($changed) {
- if (exists $i->{'checker'}) {
- my $ok = $i->{'checker'}->($value, $i);
- if ($ok ne "") {
- print "New value for " . html_quote($name) .
- " is invalid: $ok<p>\n";
- print "Please hit <b>Back</b> and try again.\n";
- $template->put_footer();
- exit;
- }
- }
- print "Changed " . html_quote($name) . ".<br>\n";
- SetParam($name, $value);
- if (($name eq "shutdownhtml") && ($value ne "")) {
- # The system is down, inform the user how to restore it
- $howto = "<p>Bugzilla has now been shut down, to re-enable ".
- "the system, please return to ".
- "<a href=\"editparams.cgi\">editparams.cgi</a>.</p>";
- }
- }
-}
-
-
-WriteParams();
-
-unlink "$datadir/versioncache";
-
-print "<p>OK, done.</p>\n";
-print $howto;
-print "<a href=\"editparams.cgi\">Edit the params some more.</a><p>\n";
-print "<a href=\"query.cgi\">Go back to the query page.</a>\n";
-
-$template->put_footer();
diff --git a/editparams.cgi b/editparams.cgi
index 8924a0edc..4b1db455b 100755
--- a/editparams.cgi
+++ b/editparams.cgi
@@ -20,126 +20,111 @@
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# J. Paul Reed <preed@sigkill.com>
-
+# Frédéric Buclin <LpSolit@gmail.com>
use strict;
use lib ".";
use Bugzilla::Constants;
-use Bugzilla::Config qw(:DEFAULT :admin);
+use Bugzilla::Config qw(:DEFAULT :admin :params $datadir);
require "globals.pl";
+use vars qw($vars @parampanels);
my $user = Bugzilla->login(LOGIN_REQUIRED);
-
+my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
-print Bugzilla->cgi->header();
+print $cgi->header();
$user->in_group('tweakparams')
|| ThrowUserError("auth_failure", {group => "tweakparams",
action => "modify",
object => "parameters"});
-$template->put_header("Edit parameters");
-
-print "This lets you edit the basic operating parameters of bugzilla.\n";
-print "Be careful!\n";
-print "<p>\n";
-print "Any item you check Reset on will get reset to its default value.\n";
-
-print "<form method=post action=doeditparams.cgi><table>\n";
-
-my $rowbreak = "<tr><td colspan=2><hr></td></tr>";
-print $rowbreak;
-
-foreach my $i (GetParamList()) {
- my $name = $i->{'name'};
- my $value = Param($name);
- print "<tr><th align=right valign=top>$name:</th><td>$i->{'desc'}</td></tr>\n";
- print "<tr><td valign=top><input type=checkbox name=reset-$name>Reset</td><td>\n";
- SWITCH: for ($i->{'type'}) {
- /^t$/ && do {
- print "<input size=80 name=$name value=\"" .
- value_quote($value) . "\">\n";
- last SWITCH;
- };
- /^l$/ && do {
- print "<textarea wrap=hard name=$name rows=10 cols=80>" .
- value_quote($value) . "</textarea>\n";
- last SWITCH;
- };
- /^b$/ && do {
- my $on;
- my $off;
- if ($value) {
- $on = "checked";
- $off = "";
- } else {
- $on = "";
- $off = "checked";
- }
- print "<input type=radio name=$name value=1 $on>On\n";
- print "<input type=radio name=$name value=0 $off>Off\n";
- last SWITCH;
- };
- /^m$/ && do {
- my @choices = @{$i->{'choices'}};
- ## showing 5 options seems like a nice round number; this should
- ## probably be configurable; if you care, file a bug ;-)
- my $boxSize = scalar(@choices) < 5 ? scalar(@choices) : 5;
-
- print "<select multiple size=\"$boxSize\" name=\"$name\">\n";
-
- foreach my $item (@choices) {
- my $selected = "";
-
- if (lsearch($value, $item) >= 0) {
- $selected = "selected";
- }
+my $action = trim($cgi->param('action') || '');
+my $current_panel = $cgi->param('section') || 'core';
+$current_panel =~ /^([A-Za-z0-9_-]+)$/;
+$current_panel = $1;
+
+my $current_module;
+my @panels = ();
+foreach my $panel (@parampanels) {
+ next if ($panel eq 'Common');
+ my @module_param_list = "Bugzilla::Config::${panel}"->get_param_list();
+ my $item = { name => lc($panel),
+ current => ($current_panel eq lc($panel)) ? 1 : 0,
+ param_list => \@module_param_list,
+ sortkey => eval "\$Bugzilla::Config::${panel}::sortkey;"
+ };
+ push(@panels, $item);
+ $current_module = $panel if ($current_panel eq lc($panel));
+}
- print "<option $selected value=\"" . html_quote($item) . "\">" .
- html_quote($item) . "</option>\n";
- }
+$vars->{panels} = \@panels;
- print "</select>\n";
- last SWITCH;
- };
- /^s$/ && do {
- print "<select name=\"$name\">\n";
- my @choices = @{$i->{'choices'}};
+if ($action eq "save") {
+ my @changes = ();
+ my @module_param_list = "Bugzilla::Config::${current_module}"->get_param_list();
- foreach my $item (@choices) {
- my $selected = "";
+ foreach my $i (@module_param_list) {
+ my $name = $i->{'name'};
+ my $value = $cgi->param($name);
- if ($value eq $item) {
- $selected = "selected";
+ if (defined $cgi->param("reset-$name")) {
+ $value = $i->{'default'};
+ } else {
+ if ($i->{'type'} eq 'm') {
+ # This simplifies the code below
+ $value = [ $cgi->param($name) ];
+ } else {
+ # Get rid of windows/mac-style line endings.
+ $value =~ s/\r\n?/\n/g;
+ # assume single linefeed is an empty string
+ $value =~ s/^\n$//;
+ }
+ }
+
+ my $changed;
+ if ($i->{'type'} eq 'm') {
+ my @old = sort @{Param($name)};
+ my @new = sort @$value;
+ if (scalar(@old) != scalar(@new)) {
+ $changed = 1;
+ } else {
+ $changed = 0; # Assume not changed...
+ for (my $cnt = 0; $cnt < scalar(@old); ++$cnt) {
+ if ($old[$cnt] ne $new[$cnt]) {
+ # entry is different, therefore changed
+ $changed = 1;
+ last;
+ }
}
-
- print "<option $selected value=\"" . html_quote($item) . "\">" .
- html_quote($item) . "</option>\n";
-
}
- print "</select>\n";
- last SWITCH;
- };
- # DEFAULT
- print "<font color=red><blink>Unknown param type $i->{'type'}!!!</blink></font>\n";
+ } else {
+ $changed = ($value eq Param($name))? 0 : 1;
+ }
+
+ if ($changed) {
+ if (exists $i->{'checker'}) {
+ my $ok = $i->{'checker'}->($value, $i);
+ if ($ok ne "") {
+ ThrowUserError('invalid_parameter', { name => $name, err => $ok });
+ }
+ }
+ push(@changes, $name);
+ SetParam($name, $value);
+ if (($name eq "shutdownhtml") && ($value ne "")) {
+ $vars->{'shutdown_is_active'} = 1;
+ }
+ }
}
- print "</td></tr>\n";
- print $rowbreak;
-}
-
-print "<tr><th align=right valign=top>version:</th><td>
-What version of Bugzilla this is. This can't be modified.
-<tr><td></td><td>" . $Bugzilla::Config::VERSION . "</td></tr>";
-
-print "</table>\n";
+ $vars->{'message'} = 'parameters_updated';
+ $vars->{'param_changed'} = \@changes;
-print "<input type=reset value=\"Reset form\"><br>\n";
-print "<input type=submit value=\"Submit changes\">\n";
-
-print "</form>\n";
+ WriteParams();
+ unlink "$datadir/versioncache";
+}
-print "<p><a href=query.cgi>Skip all this, and go back to the query page</a>\n";
-$template->put_footer();
+$template->process("admin/params/editparams.html.tmpl", $vars)
+ || ThrowTemplateError($template->error());
diff --git a/skins/standard/params.css b/skins/standard/params.css
new file mode 100644
index 000000000..4f46353bd
--- /dev/null
+++ b/skins/standard/params.css
@@ -0,0 +1,44 @@
+#menu {
+ width: 10em;
+ margin-top: 1em;
+ margin-right: 0.5em;
+ border: solid thin;
+ border-spacing: 0px;
+ border-collapse: collapse;
+ text-align: center;
+ color: black;
+ background-color: #edf2f2;
+ font-weight: normal;
+}
+
+#menu a:link, #menu a:visited {
+ color: #039;
+ background-color: transparent;
+}
+
+#menu a:hover, #menu a:active {
+ color: red;
+ background-color: transparent;
+}
+
+#menu td {
+ border: solid thin;
+ padding: 0.2em 0.5em;
+}
+
+table td {
+ vertical-align: top;
+}
+
+td.selected_section {
+ color: #090;
+ background-color: white;
+}
+
+dt {
+ font-weight: bold;
+}
+
+dd {
+ margin-bottom: 1.5em;
+}
diff --git a/template/en/default/admin/params/admin.html.tmpl b/template/en/default/admin/params/admin.html.tmpl
new file mode 100644
index 000000000..202902b15
--- /dev/null
+++ b/template/en/default/admin/params/admin.html.tmpl
@@ -0,0 +1,66 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Administrative Policies"
+ desc = "Set up account and attachment policies"
+%]
+
+[% param_descs = {
+ allowbugdeletion => "The pages to edit products and components and versions can delete " _
+ "all associated $terms.bugs when you delete a product (or component or " _
+ "version). Since that is a pretty scary idea, you have to turn on " _
+ "this option before any such deletions will ever happen.",
+
+ allowemailchange => "Users can change their own email address through the preferences. " _
+ "Note that the change is validated by emailing both addresses, so " _
+ "switching this option on will not let users use an invalid address.",
+
+ allowuserdeletion => "The user editing pages are capable of letting you delete user accounts. " _
+ "$terms.Bugzilla will issue a warning in case you'd run into inconsistencies " _
+ "when you're about to do so, but such deletions remain kinda scary. " _
+ "So, you have to turn on this option before any such deletions " _
+ "will ever happen.",
+
+ supportwatchers => "Support one user watching (ie getting copies of all related " _
+ "email about) another's ${terms.bugs}. Useful for people going on " _
+ "vacation, and QA folks watching particular developers' ${terms.bugs}.",
+
+ maxpatchsize => "The maximum size (in kilobytes) of patches. $terms.Bugzilla will not " _
+ "accept patches greater than this number of kilobytes in size. " _
+ "To accept patches of any size (subject to the limitations of " _
+ "your server software), set this value to zero.",
+
+ maxattachmentsize => "The maximum size (in kilobytes) of non-patch attachments. " _
+ "$terms.Bugzilla will not accept attachments greater than this number " _
+ "of kilobytes in size. To accept attachments of any size " _
+ "(subject to the limitations of your server software), set this " _
+ "value to zero.",
+
+ maxlocalattachment => "The maximum size (in megabytes) of attachments identified by " _
+ "the user as 'Big Files' to be stored locally on the webserver. " _
+ "If set to zero, attachments will never be kept on the local " _
+ "filesystem.",
+
+ convert_uncompressed_images => "If this option is on, attachments with content type image/bmp " _
+ "will be converted to image/png and compressed before uploading to " _
+ "the database to conserve disk space." }
+%] \ No newline at end of file
diff --git a/template/en/default/admin/params/auth.html.tmpl b/template/en/default/admin/params/auth.html.tmpl
new file mode 100644
index 000000000..040190699
--- /dev/null
+++ b/template/en/default/admin/params/auth.html.tmpl
@@ -0,0 +1,124 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "User Authentication"
+ desc = "Set up your authentication policies"
+%]
+
+[% param_descs = {
+ auth_env_id => "Environment variable used by external authentication system " _
+ "to store a unique identifier for each user. Leave it blank " _
+ "if there isn't one or if this method of authentication " _
+ "is not being used.",
+
+ auth_env_email => "Environment variable used by external authentication system " _
+ "to store each user's email address. This is a required " _
+ "field for environmental authentication. Leave it blank " _
+ "if you are not going to use this feature.",
+
+ auth_env_realname => "Environment variable used by external authentication system " _
+ "to store the user's real name. Leave it blank if there " _
+ "isn't one or if this method of authentication is not being " _
+ "used.",
+
+ user_info_class => "Mechanism(s) to be used for gathering a user's login information.
+ More than one may be selected. If the first one returns nothing,
+ the second is tried, and so on.<br>
+ The types are:
+ <dl>
+ <dt>CGI</dt>
+ <dd>
+ Asks for username and password via CGI form interface.
+ </dd>
+ <dt>Env</dt>
+ <dd>
+ Info for a pre-authenticated user is passed in system
+ environment variables.
+ </dd>
+ </dl>",
+
+ user_verify_class => "Mechanism(s) to be used for verifying (authenticating) information
+ gathered by user_info_class.
+ More than one may be selected. If the first one cannot find the
+ user, the second is tried, and so on.<br>
+ The types are:
+ <dl>
+ <dt>DB</dt>
+ <dd>
+ ${terms.Bugzilla}'s built-in authentication. This is the most common
+ choice.
+ </dd>
+ <dt>LDAP</dt>
+ <dd>
+ LDAP authentication using an LDAP server. This method is
+ experimental; please see the $terms.Bugzilla documentation for more
+ information. Using this method requires additional parameters
+ to be set above.
+ </dd>
+ </dl>",
+
+ rememberlogin => "Controls management of session cookies
+ <ul>
+ <li>
+ on - Session cookies never expire (the user has to login only
+ once per browser).
+ </li>
+ <li>
+ off - Session cookies last until the users session ends (the user
+ will have to login in each new browser session).
+ </li>
+ <li>
+ defaulton/defaultoff - Default behavior as described
+ above, but user can choose whether $terms.Bugzilla will remember his
+ login or not.
+ </li>
+ </ul>",
+
+ loginnetmask => "The number of bits for the netmask used if a user chooses to " _
+ "allow a login to be valid for more than a single IP. Setting " _
+ "this to 32 disables this feature.<br> " _
+ "Note that enabling this may decrease the security of your system.",
+
+ requirelogin => "If this option is set, all access to the system beyond the " _
+ "front page will require a login. No anonymous users will " _
+ "be permitted.",
+
+ emailregexp => "This defines the regexp to use for legal email addresses. The " _
+ "default tries to match fully qualified email addresses. Another " _
+ "popular value to put here is <tt>^[^@]+$</tt>, which means " _
+ "'local usernames, no @ allowed.'",
+
+ emailregexpdesc => "This describes in English words what kinds of legal addresses " _
+ "are allowed by the <tt>emailregexp</tt> param.",
+
+ emailsuffix => "This is a string to append to any email addresses when actually " _
+ "sending mail to that address. It is useful if you have changed " _
+ "the <tt>emailregexp</tt> param to only allow local usernames, " _
+ "but you want the mail to be delivered to username@my.local.hostname.",
+
+ createemailregexp => "This defines the regexp to use for email addresses that are " _
+ "permitted to self-register using a 'New Account' feature. The " _
+ "default (.*) permits any account matching the emailregexp " _
+ "to be created. If this parameter is left blank, no users " _
+ "will be permitted to create their own accounts and all accounts " _
+ "will have to be created by an administrator." }
+%] \ No newline at end of file
diff --git a/template/en/default/admin/params/bugchange.html.tmpl b/template/en/default/admin/params/bugchange.html.tmpl
new file mode 100644
index 000000000..02ed1bce5
--- /dev/null
+++ b/template/en/default/admin/params/bugchange.html.tmpl
@@ -0,0 +1,78 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Bug Change Policies"
+ desc = "Set up bug change policies"
+%]
+
+[% param_descs = {
+ letsubmitterchoosepriority => "If this is on, then people submitting $terms.bugs can " _
+ "choose an initial priority for that ${terms.bug}. " _
+ "If off, then all $terms.bugs initially have the default " _
+ "priority selected below.",
+
+ letsubmitterchoosemilestone => "If this is on, then people submitting $terms.bugs can " _
+ "choose the Target Milestone for that ${terms.bug}. " _
+ "If off, then all $terms.bugs initially have the default " _
+ "milestone for the product being filed in.",
+
+ defaultpriority => "This is the priority that newly entered $terms.bugs are set to.",
+
+ musthavemilestoneonaccept => "If you are using Target Milestone, do you want to require that " _
+ "the milestone be set in order for a user to ACCEPT a ${terms.bug}?",
+
+ commentoncreate => "If this option is on, the user needs to enter a description " _
+ "when entering a new ${terms.bug}.",
+
+ commentonaccept => "If this option is on, the user needs to enter a short comment if " _
+ "he accepts the ${terms.bug}.",
+
+ commentonclearresolution => "If this option is on, the user needs to enter a short comment if " _
+ "the ${terms.bug}'s resolution is cleared.",
+
+ commentonconfirm => "If this option is on, the user needs to enter a short comment " _
+ "when confirming a ${terms.bug}.",
+
+ commentonresolve => "If this option is on, the user needs to enter a short comment if " _
+ "the $terms.bug is resolved.",
+
+ commentonreassign => "If this option is on, the user needs to enter a short comment if " _
+ "the $terms.bug is reassigned.",
+
+ commentonreassignbycomponent => "If this option is on, the user needs to enter a short comment if " _
+ "the $terms.bug is reassigned by component.",
+
+ commentonreopen => "If this option is on, the user needs to enter a short comment if " _
+ "the $terms.bug is reopened.",
+
+ commentonverify => "If this option is on, the user needs to enter a short comment if " _
+ "the $terms.bug is verified.",
+
+ commentonclose => "If this option is on, the user needs to enter a short comment if " _
+ "the $terms.bug is closed.",
+
+ commentonduplicate => "If this option is on, the user needs to enter a short comment " _
+ "if the $terms.bug is marked as duplicate.",
+
+ noresolveonopenblockers => "Don\'t allow $terms.bugs to be resolved as fixed " _
+ "if they have unresolved dependencies." }
+%]
diff --git a/template/en/default/admin/params/bugfields.html.tmpl b/template/en/default/admin/params/bugfields.html.tmpl
new file mode 100644
index 000000000..2e82e08e5
--- /dev/null
+++ b/template/en/default/admin/params/bugfields.html.tmpl
@@ -0,0 +1,62 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Bug Fields"
+ desc = "Choose fields you want to display"
+%]
+
+[% param_descs = {
+ useclassification => "If this is on, $terms.Bugzilla will associate each product with a " _
+ "specific classification. But you must have 'editclassification' " _
+ "permissions enabled in order to edit classifications.",
+
+ showallproducts => "If this is on and useclassification is set, $terms.Bugzilla will add a " _
+ "'All' link in the 'New $terms.Bug' page to list all available products.",
+
+ usetargetmilestone => "Do you wish to use the Target Milestone field?",
+
+ useqacontact => "Do you wish to use the QA Contact field?",
+
+ usestatuswhiteboard => "Do you wish to use the Status Whiteboard field?",
+
+ usevotes => "Do you wish to allow users to vote for ${terms.bugs}? Note that in order " _
+ "for this to be effective, you will have to change the maximum " _
+ "votes allowed in a product to be non-zero in " _
+ "<a href=\"editproducts.cgi\">the product edit page</a>.",
+
+ usebugaliases => "Do you wish to use $terms.bug aliases, which allow you to assign " _
+ "$terms.bugs an easy-to-remember name by which you can refer to them?",
+
+ defaultseverity => "This is the severity that newly entered $terms.bugs are set to.",
+
+ defaultplatform => "This is the platform that is preselected on the $terms.bug " _
+ "entry form.<br> " _
+ "You can leave this empty: " _
+ "$terms.Bugzilla will then use the platform that the browser " _
+ "reports to be running on as the default.",
+
+ defaultopsys => "This is the operating system that is preselected on the $terms.bug " _
+ "entry form.<br> " _
+ "You can leave this empty: " _
+ "$terms.Bugzilla will then use the operating system that the browser " _
+ "reports to be running on as the default." }
+%] \ No newline at end of file
diff --git a/template/en/default/admin/params/bugmove.html.tmpl b/template/en/default/admin/params/bugmove.html.tmpl
new file mode 100644
index 000000000..902cb5a3e
--- /dev/null
+++ b/template/en/default/admin/params/bugmove.html.tmpl
@@ -0,0 +1,50 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Bug Moving"
+ desc = "Set up parameters to move bugs to/from another installation"
+%]
+
+[% param_descs = {
+ "move-enabled" => "If this is on, $terms.Bugzilla will allow certain people " _
+ "to move $terms.bugs to the defined database.",
+
+ "move-button-text" => "The text written on the Move button. Explain where the $terms.bug is " _
+ "being moved to.",
+
+ "move-to-url" => "The URL of the database we allow some of our $terms.bugs to be moved to.",
+
+ "move-to-address" => "To move ${terms.bugs}, an email is sent to the target database. This is " _
+ "the email address that database uses to listen for incoming ${terms.bugs}.",
+
+ "moved-from-address" => "To move ${terms.bugs}, an email is sent to the target database. This is " _
+ "the email address from which this mail, and error messages are sent.",
+
+ movers => "A list of people with permission to move $terms.bugs and reopen moved " _
+ "${terms.bugs} (in case the move operation fails).",
+
+ "moved-default-product" => "$terms.Bugs moved from other databases to here are assigned " _
+ "to this product.",
+
+ "moved-default-component" => "$terms.Bugs moved from other databases to here are assigned " _
+ "to this component." }
+%]
diff --git a/template/en/default/admin/params/common.html.tmpl b/template/en/default/admin/params/common.html.tmpl
new file mode 100644
index 000000000..d04e83d3f
--- /dev/null
+++ b/template/en/default/admin/params/common.html.tmpl
@@ -0,0 +1,75 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%# INTERFACE:
+ # panel: hash representing the current panel.
+ #%]
+
+<dl>
+ [% FOREACH param = panel.param_list %]
+ <dt>[% param.name FILTER html %]</dt>
+ <dd>[% panel.param_descs.${param.name} FILTER none %]
+ <p>
+ [% IF param.type == "t" %]
+ <input size="80" name="[% param.name FILTER html %]"
+ value="[% Param(param.name) FILTER html %]">
+ [% ELSIF param.type == "l" %]
+ <textarea name="[% param.name FILTER html %]" rows="10" cols="80">
+ [% Param(param.name) FILTER html %]</textarea>
+ [% ELSIF param.type == "b" %]
+ <input type="radio" name="[% param.name FILTER html %]"
+ value=1 [% "checked=\"checked\"" IF Param(param.name) %]>On
+ <input type="radio" name="[% param.name FILTER html %]"
+ value=0 [% "checked=\"checked\"" IF !Param(param.name) %]>Off
+ [% ELSIF param.type == "m" %]
+ [% boxSize = 5 %]
+ [% boxSize = param.choices.size IF param.choices.size < 5 %]
+
+ <select multiple="multiple" size="[% boxSize FILTER html %]"
+ name="[% param.name FILTER html %]">
+ [% FOREACH item = param.choices %]
+ <option value="[% item FILTER html %]"
+ [% " selected=\"selected\"" IF lsearch(Param(param.name), item) != -1 %]>
+ [% item FILTER html %]
+ </option>
+ [% END %]
+ </select>
+ [% ELSIF param.type == "s" %]
+ <select name="[% param.name FILTER html %]">
+ [% FOREACH item = param.choices %]
+ <option value="[% item FILTER html %]"
+ [% " selected=\"selected\"" IF item == Param(param.name) %]>
+ [% item FILTER html %]
+ </option>
+ [% END %]
+ </select>
+ [% ELSE %]
+ <font color="red">
+ <blink>Unknown param type [% param.type FILTER html %]!!!</blink>
+ </font>
+ [% END %]
+ </p>
+ <p>
+ <input type="checkbox" name="reset-[% param.name FILTER html %]">Reset
+ </p>
+ <hr>
+ </dd>
+ [% END %]
+</dl>
diff --git a/template/en/default/admin/params/core.html.tmpl b/template/en/default/admin/params/core.html.tmpl
new file mode 100644
index 000000000..adf527c33
--- /dev/null
+++ b/template/en/default/admin/params/core.html.tmpl
@@ -0,0 +1,68 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+
+[%
+ title = "Required Settings"
+ desc = "Settings that are required for proper operation of $terms.Bugzilla"
+%]
+
+[% param_descs = {
+ maintainer => "The email address of the person who maintains this installation " _
+ "of ${terms.Bugzilla}.",
+
+ urlbase => "The URL that is the common initial leading part of all $terms.Bugzilla " _
+ "URLs.",
+
+ sslbase => "The URL that is the common initial leading part of all HTTPS " _
+ "(SSL) $terms.Bugzilla URLs.",
+
+ ssl => "Controls when $terms.Bugzilla should enforce sessions to use HTTPS by " _
+ "using <tt>sslbase</tt>.",
+
+ cookiedomain => "The domain for $terms.Bugzilla cookies. Normally blank. " _
+ "If your website is at 'www.foo.com', setting this to " _
+ "'.foo.com' will also allow 'bar.foo.com' to access " _
+ "$terms.Bugzilla cookies. This is useful if you have more than " _
+ "one hostname pointing at the same web server, and you " _
+ "want them to share the $terms.Bugzilla cookie.",
+
+ cookiepath => "Path, relative to your web document root, to which to restrict " _
+ "$terms.Bugzilla cookies. Normally this is the URI portion of your URL " _
+ "base. Begin with a / (single slash mark). For instance, if " _
+ "$terms.Bugzilla serves from 'http://www.somedomain.com/bugzilla/', set " _
+ "this parameter to /bugzilla/. Setting it to / will allow " _
+ "all sites served by this web server or virtual host to read " _
+ "$terms.Bugzilla cookies.",
+
+ timezone => "The timezone that your database server lives in. If set to '', " _
+ "then the timezone will not be displayed with the timestamps.",
+
+ utf8 => "Use UTF-8 (Unicode) encoding for all text in ${terms.Bugzilla}. New " _
+ "installations should set this to true to avoid character encoding " _
+ "problems. Existing databases should set this to true only after " _
+ "the data has been converted from existing legacy character " _
+ "encodings to UTF-8.",
+
+ shutdownhtml => "If this field is non-empty, then $terms.Bugzilla will be completely " _
+ "disabled and this text will be displayed instead of all the " _
+ "$terms.Bugzilla pages." }
+%] \ No newline at end of file
diff --git a/template/en/default/admin/params/dependencygraph.html.tmpl b/template/en/default/admin/params/dependencygraph.html.tmpl
new file mode 100644
index 000000000..9ac2ad04b
--- /dev/null
+++ b/template/en/default/admin/params/dependencygraph.html.tmpl
@@ -0,0 +1,50 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Dependency Graphs"
+ desc = "Optional setup for dependency graphing"
+%]
+
+[% param_descs = {
+ webdotbase => "It is possible to show graphs of dependent ${terms.bugs}. You may set
+ this parameter to any of the following:
+ <ul>
+ <li>
+ A complete file path to 'dot' (part of
+ <a href=\"http://www.graphviz.org\">GraphViz</a>) will
+ generate the graphs locally.
+ </li>
+ <li>
+ A URL prefix pointing to an installation of the
+ <a href=\"http://www.research.att.com/~north/cgi-bin/webdot.cgi\">webdot
+ package</a> will generate the graphs remotely.
+ </li>
+ <li>
+ A blank value will disable dependency graphing.
+ </li>
+ </ul>
+ The default value is a publicly-accessible webdot server. If you change
+ this value, make certain that the webdot server can read files from your
+ webdot directory. On Apache you do this by editing the .htaccess file,
+ for other systems the needed measures may vary. You can run checksetup.pl
+ to recreate the .htaccess file if it has been lost."}
+%] \ No newline at end of file
diff --git a/template/en/default/admin/params/editparams.html.tmpl b/template/en/default/admin/params/editparams.html.tmpl
new file mode 100644
index 000000000..bd94cc513
--- /dev/null
+++ b/template/en/default/admin/params/editparams.html.tmpl
@@ -0,0 +1,90 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%# INTERFACE:
+ # panels: array of hashes representing the panels available.
+ # param_changed: array of parameters which have been changed.
+ # shutdown_is_active: boolean; is true when 'shutdownhtml' has been turned on.
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% curpanel = 0 %]
+[% panels = panels.sort('sortkey') %]
+
+[% FOREACH panel = panels %]
+ [% PROCESS "admin/params/${panel.name}.html.tmpl"
+ params = panel.param_list %]
+ [% panel.title = title %]
+ [% panel.desc = desc %]
+ [% panel.param_descs = param_descs %]
+ [% IF panel.current %][% curpanel = loop.index %][% END %]
+[% END %]
+
+[% current_panel = panels.$curpanel %]
+
+[%# We cannot call header.html.tmpl earlier as we have to know which panel is active first %]
+[% PROCESS global/header.html.tmpl
+ title = "$terms.Bugzilla Configuration: $current_panel.title"
+ message = message
+ style_urls = ['skins/standard/params.css']
+%]
+
+<table border="0" width="100%">
+ <tr>
+ <td>
+ [%# NAVIGATION BAR %]
+ <table id="menu">
+ [% FOREACH panel = panels %]
+ <tr>
+ [% IF panel.current %]
+ <td class="selected_section">
+ <span title="[% panel.desc FILTER html %]">[% panel.title FILTER html %]</span>
+ </td>
+ [% ELSE %]
+ <td>
+ <a href="editparams.cgi?section=[% panel.name FILTER url_quote %]"
+ title="[% panel.desc FILTER html %]">[% panel.title FILTER html %]</a>
+ </td>
+ [% END %]
+ </tr>
+ [% END %]
+ </table>
+ </td>
+ <td>
+ <p>
+ This lets you edit the basic operating parameters of [% terms.Bugzilla %].
+ Be careful!<br>
+ Any item you check "Reset" on will get reset to its default value.
+ </p>
+ [%# CONTENT PANEL %]
+ <form method="post" action="editparams.cgi">
+ [% PROCESS admin/params/common.html.tmpl panel = current_panel %]
+ <input type="hidden" name="section" value="[% current_panel.name FILTER html %]">
+ <input type="hidden" name="action" value="save">
+ <input type="reset" value="Reset form">
+ <input type="submit" name="action" value="Save Changes">
+ </form>
+ </td>
+ </tr>
+</table>
+
+[% INCLUDE global/footer.html.tmpl %]
diff --git a/template/en/default/admin/params/groupsecurity.html.tmpl b/template/en/default/admin/params/groupsecurity.html.tmpl
new file mode 100644
index 000000000..fe986f387
--- /dev/null
+++ b/template/en/default/admin/params/groupsecurity.html.tmpl
@@ -0,0 +1,51 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Group Security"
+ desc = "Decide how you will use Security Groups"
+%]
+
+[% param_descs = {
+ makeproductgroups => "If this is on, $terms.Bugzilla will associate a $terms.bug group " _
+ "with each product in the database, and use it for querying ${terms.bugs}.",
+
+ useentrygroupdefault => "If this is on, $terms.Bugzilla will use product $terms.bug groups " _
+ "by default to restrict who can enter ${terms.bugs}. If this is on, " _
+ "users can see any product to which they have entry access in search menus. " _
+ "If this is off, users can see any product to which they have not " _
+ "been excluded by a mandatory restriction.",
+
+ chartgroup => "The name of the group of users who can use the 'New Charts' " _
+ "feature. Administrators should ensure that the public categories " _
+ "and series definitions do not divulge confidential information " _
+ "before enabling this for an untrusted population. If left blank, " _
+ "no users will be able to use New Charts.",
+
+ insidergroup => "The name of the group of users who can see/change private " _
+ "comments and attachments.",
+
+ timetrackinggroup => "The name of the group of users who can see/change time tracking " _
+ "information.",
+
+ usevisibilitygroups => "Do you wish to restrict visibility of users to members of " _
+ "specific groups?" }
+%]
diff --git a/template/en/default/admin/params/l10n.html.tmpl b/template/en/default/admin/params/l10n.html.tmpl
new file mode 100644
index 000000000..1ab062cca
--- /dev/null
+++ b/template/en/default/admin/params/l10n.html.tmpl
@@ -0,0 +1,46 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Localization"
+ desc = "Define what languages you want made available to your users"
+%]
+
+[%# Get the list of available languages %]
+[% available_languages = "unknown" %]
+[% FOREACH param = params %]
+ [% IF param.name == "languages" %]
+ [% available_languages = param.extra_desc.available_languages FILTER html %]
+ [% END %]
+[% END %]
+
+[% param_descs = {
+ languages => "A comma-separated list of RFC 1766 language tags. These " _
+ "identify the languages in which you wish $terms.Bugzilla output " _
+ "to be displayed. Note that you must install the appropriate " _
+ "language pack before adding a language to this Param. The " _
+ "language used is the one in this list with the highest " _
+ "q-value in the user's Accept-Language header.<br> " _
+ "Available languages: $available_languages" ,
+
+ defaultlanguage => "The UI language $terms.Bugzilla falls back on if no suitable " _
+ "language is found in the user's Accept-Language header." }
+%]
diff --git a/template/en/default/admin/params/ldap.html.tmpl b/template/en/default/admin/params/ldap.html.tmpl
new file mode 100644
index 000000000..6e7068796
--- /dev/null
+++ b/template/en/default/admin/params/ldap.html.tmpl
@@ -0,0 +1,46 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "LDAP"
+ desc = "Configure this first before choosing LDAP as an authentication method"
+%]
+
+[% param_descs = {
+ LDAPserver => "The name (and optionally port) of your LDAP server " _
+ "(e.g. ldap.company.com, or ldap.company.com:portnum).",
+
+ LDAPbinddn => "If your LDAP server requires that you use a binddn and password " _
+ "instead of binding anonymously, enter it here " _
+ "(e.g. cn=default,cn=user:password). " _
+ "Leave this empty for the normal case of an anonymous bind.",
+
+ LDAPBaseDN => "The BaseDN for authenticating users against " _
+ "(e.g. ou=People,o=Company).",
+
+ LDAPuidattribute => "The name of the attribute containing the user's login name.",
+
+ LDAPmailattribute => "The name of the attribute of a user in your directory that " _
+ "contains the email address.",
+
+ LDAPfilter => "LDAP filter to AND with the <tt>LDAPuidattribute</tt> for " _
+ "filtering the list of valid users." }
+%]
diff --git a/template/en/default/admin/params/mta.html.tmpl b/template/en/default/admin/params/mta.html.tmpl
new file mode 100644
index 000000000..4dd0f0088
--- /dev/null
+++ b/template/en/default/admin/params/mta.html.tmpl
@@ -0,0 +1,109 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Mail Transport Config"
+ desc = "How will outgoing mail be delivered?"
+%]
+
+[% param_descs = {
+ mail_delivery_method => "Defines how email is sent, or if it is sent at all.<br>
+ <ul>
+ <li>
+ 'sendmail', 'smtp' and 'qmail' are all MTAs.
+ You need to install a third-party sendmail replacement if
+ you want to use sendmail on Windows.
+ </li>
+ <li>
+ 'testfile' is useful for debugging: all email is stored
+ in 'data/mailer.testfile' instead of being sent. For more
+ information, see the Mail::Mailer manual.
+ </li>
+ <li>
+ 'none' will completely disable email. $terms.Bugzilla continues
+ to act as though it is sending mail, but nothing is sent or
+ stored.
+ </li>
+ </ul>",
+
+ sendmailnow => "Sites using anything older than version 8.12 of 'sendmail' " _
+ "can achieve a significant performance increase in the " _
+ "UI -- at the cost of delaying the sending of mail -- by " _
+ "disabling this parameter. Sites using 'sendmail' 8.12 or " _
+ "higher should leave this on, as they will see no benefit from " _
+ "turning it off. Sites using an MTA other than 'sendmail' " _
+ "<b>must</b> leave it on, or no $terms.bug mail will be sent.",
+
+ smtpserver => "The SMTP server address (if using SMTP for mail delivery).",
+
+ passwordmail => "The email that gets sent to people to tell them their password. " _
+ "Within this text, %mailaddress% gets replaced by the person's " _
+ "email address, %login% gets replaced by the person's login " _
+ "(usually the same thing), and %password% gets replaced by their " _
+ "password. %<i>anythingelse</i>% gets replaced by the " _
+ "definition of that parameter (as defined on this page).",
+
+ newchangedmail => "The email that gets sent to people when a $terms.bug changes. Within " _
+ "this text, %to% gets replaced with the e-mail address of the " _
+ "person receiving the mail. %bugid% gets replaced by the $terms.bug " _
+ "number. %diffs% gets replaced with what has changed. " _
+ "%neworchanged% is 'New:' if this mail is reporting a new $terms.bug or " _
+ "empty if changes were made to an existing one. %summary% gets " _
+ "replaced by the summary of this ${terms.bug}. %reasonsheader% is " _
+ "replaced by an abbreviated list of reasons why the user is " _
+ "getting the email, suitable for use in an email header (such " _
+ "as X-Bugzilla-Reason). %reasonsbody% is replaced by text that " _
+ "explains why the user is getting the email in more user " _
+ "friendly text than %reasonsheader%. " _
+ "%threadingmarker% will become either a Message-ID line (for " _
+ "new-${terms.bug} messages) or a In-Reply-To line (for ${terms.bug}-change " _
+ "messages). " _
+ "%<i>anythingelse</i>% gets " _
+ "replaced by the definition of that parameter (as defined on " _
+ "this page).",
+
+ whinedays => "The number of days that we'll let a $terms.bug sit untouched in a NEW " _
+ "state before our cronjob will whine at the owner.<br> " _
+ "Set to 0 to disable whining.",
+
+ whinemail => "The email that gets sent to anyone who has a NEW or REOPENED " _
+ "$terms.bug that hasn't been touched for more than <b>whinedays</b>. " _
+ "Within this text, %email% gets replaced by the offender's " _
+ "email address. %userid% gets replaced by the offender's " _
+ "$terms.Bugzilla login (which, in most installations, is the same as " _
+ "the email address.) %<i>anythingelse</i>% gets replaced by the " _
+ "definition of that parameter (as defined on this page).<p> " _
+ "It is a good idea to make sure this message has a valid From: " _
+ "address, so that if the mail bounces, a real person can know " _
+ "that there are $terms.bugs assigned to an invalid address.",
+
+ voteremovedmail => "This is a mail message to send to anyone who gets a vote removed " _
+ "from $terms.abug for any reason. %to% gets replaced by the person who " _
+ "used to be voting for this ${terms.bug}. %bugid% gets replaced by the " _
+ "$terms.bug number. %reason% gets replaced by a short reason describing " _
+ "why the vote(s) were removed. %votesremoved%, %votesold% and " _
+ "%votesnew% is the number of votes removed, before and after " _
+ "respectively. %votesremovedtext%, %votesoldtext% and " _
+ "%votesnewtext% are these as sentences, e.g. 'You had 2 votes on " _
+ "this ${terms.bug}.' %count% is also supported for backwards " _
+ "compatibility. %<i>anythingelse</i>% gets replaced by the " _
+ "definition of that parameter (as defined on this page)." }
+%]
diff --git a/template/en/default/admin/params/patchviewer.html.tmpl b/template/en/default/admin/params/patchviewer.html.tmpl
new file mode 100644
index 000000000..f3dd6d4a1
--- /dev/null
+++ b/template/en/default/admin/params/patchviewer.html.tmpl
@@ -0,0 +1,65 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Patch Viewer"
+ desc = "Set up third-party applications to run with PatchViewer"
+%]
+
+[% param_descs = {
+ cvsroot => "The <a href=\"http://www.cvshome.org\">CVS</a> root that most " _
+ "users of your system will be using for 'cvs diff'. Used in " _
+ "Patch Viewer ('Diff' option on patches) to figure out where " _
+ "patches are rooted even if users did the 'cvs diff' from " _
+ "different places in the directory structure (NOTE: if your " _
+ "CVS repository is remote and requires a password, you must " _
+ "either ensure the $terms.Bugzilla user has done a 'cvs login' or " _
+ "specify the password " _
+ "<a href=\"http://www.cvshome.org/docs/manual/cvs_2.html#SEC26\">as " _
+ "part of the CVS root.</a>). Leave this blank if you have no " _
+ "CVS repository.",
+
+ cvsroot_get => "The CVS root $terms.Bugzilla will be using to get patches from. " _
+ "Some installations may want to mirror their CVS repository on " _
+ "the $terms.Bugzilla server or even have it on that same server, and " _
+ "thus the repository can be the local file system (and much " _
+ "faster). Make this the same as cvsroot if you don't " _
+ "understand what this is (if cvsroot is blank, make this blank too).",
+
+ bonsai_url => "The URL to a <a href=\"http://www.mozilla.org/bonsai.html\">Bonsai</a> " _
+ "server containing information about your CVS repository. " _
+ "Patch Viewer will use this information to create links to " _
+ "bonsai's blame for each section of a patch (it will append " _
+ "'/cvsblame.cgi?...' to this url). Leave this blank if you " _
+ "don't understand what this is.",
+
+ lxr_url => "The URL to an <a href=\"http://sourceforge.net/projects/lxr\">LXR</a> server " _
+ "that indexes your CVS repository. Patch Viewer will use this " _
+ "information to create links to LXR for each file in a patch. " _
+ "Leave this blank if you don't understand what this is.",
+
+ lxr_root => "Some LXR installations do not index the CVS repository from the root -- " _
+ "<a href=\"http://lxr.mozilla.org/mozilla\">Mozilla's</a>, for " _
+ "example, starts indexing under <code>mozilla/</code>. This " _
+ "means URLs are relative to that extra path under the root. " _
+ "Enter this if you have a similar situation. Leave it blank " _
+ "if you don't know what this is." }
+%]
diff --git a/template/en/default/admin/params/query.html.tmpl b/template/en/default/admin/params/query.html.tmpl
new file mode 100644
index 000000000..ca4280f62
--- /dev/null
+++ b/template/en/default/admin/params/query.html.tmpl
@@ -0,0 +1,58 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Query Defaults"
+ desc = "Default options for query and buglists"
+%]
+
+[% param_descs = {
+ quip_list_entry_control => "Controls how easily users can add entries to the quip list.
+ <ul>
+ <li>
+ open - Users may freely add to the quip list, and
+ their entries will immediately be available for viewing.
+ </li>
+ <li>
+ moderated - quips can be entered, but need to be approved
+ by an admin before they will be shown.
+ </li>
+ <li>
+ closed - no new additions to the quips list are allowed.
+ </li>
+ </ul>",
+
+ mostfreqthreshold => "The minimum number of duplicates $terms.abug needs to show up on the " _
+ "<a href=\"duplicates.cgi\">most frequently reported $terms.bugs page</a>. " _
+ "If you have a large database and this page takes a long time to " _
+ "load, try increasing this number.",
+
+ mybugstemplate => "This is the URL to use to bring up a simple 'all of my $terms.bugs' " _
+ "list for a user. %userid% will get replaced with the login name of a user.",
+
+ defaultquery => "This is the default query that initially comes up when you " _
+ "access the advanced query page. It's in URL parameter " _
+ "format, which makes it hard to read. Sorry!",
+
+ quicksearch_comment_cutoff => "The maximum number of search terms for a QuickSearch " _
+ "to search comments. If the QuickSearch query contains " _
+ "more terms than this value, QuickSearch will not search comments." }
+%]
diff --git a/template/en/default/admin/params/shadowdb.html.tmpl b/template/en/default/admin/params/shadowdb.html.tmpl
new file mode 100644
index 000000000..7d038381a
--- /dev/null
+++ b/template/en/default/admin/params/shadowdb.html.tmpl
@@ -0,0 +1,50 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "Shadow Database"
+ desc = "An optional hack to increase database performance"
+%]
+
+[% param_descs = {
+ shadowdbhost => "The host the shadow database is on.",
+
+ shadowdbport => "The port the shadow database is on. Ignored if " _
+ "<tt>shadowdbhost</tt> is blank. Note: if the host is the local " _
+ "machine, then MySQL will ignore this setting, and you must " _
+ "specify a socket below.",
+
+ shadowdbsock => "The socket used to connect to the shadow database, if the host " _
+ "is the local machine. This setting is required because MySQL " _
+ "ignores the port specified by the client and connects using " _
+ "its compiled-in socket path (on unix machines) when connecting " _
+ "from a client to a local server. If you leave this blank, and " _
+ "have the database on localhost, then the <tt>shadowdbport</tt> " _
+ "will be ignored.",
+
+ shadowdb => "If non-empty, then this is the name of another database in " _
+ "which $terms.Bugzilla will use as a read-only copy of everything. " _
+ "This is done so that long slow read-only operations can be used " _
+ "against this db, and not lock up things for everyone else. This " _
+ "database is on the <tt>shadowdbhost</tt>, and must exist. " _
+ "$terms.Bugzilla does not update it, if you use this parameter, then " _
+ "you need to set up replication for your database." }
+%]
diff --git a/template/en/default/admin/params/usermatch.html.tmpl b/template/en/default/admin/params/usermatch.html.tmpl
new file mode 100644
index 000000000..bf733c933
--- /dev/null
+++ b/template/en/default/admin/params/usermatch.html.tmpl
@@ -0,0 +1,45 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@bugzilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
+ #%]
+[%
+ title = "User Matching"
+ desc = "Set up your user matching policies"
+%]
+
+[% param_descs = {
+ usemenuforusers => "If this option is set, a popup menu will be used where a user " _
+ "needs to be selected. This option should not be enabled on " _
+ "sites where there are a large number of users.",
+
+ usermatchmode => "Allow match strings to be entered for user names when entering " _
+ "and editing ${terms.bugs}.<p> " _
+ "'off' disables matching,<br> " _
+ "'wildcard' allows only wildcards,<br> " _
+ "and 'search' allows both wildcards and substring (freetext) matches.",
+
+ maxusermatches => "Search for no more than this many matches.<br> " _
+ "If set to '1', no users will be displayed on ambiguous matches. " _
+ "This is useful for user privacy purposes.<br> " _
+ "A value of zero means no limit.",
+
+ confirmuniqueusermatch => "Whether a confirmation screen should be displayed when only " _
+ "one user matches a search entry." }
+%]
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index d0435597d..7a33265a5 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -169,6 +169,22 @@
[% title = "$terms.Bugzilla Login Changed" %]
Your [% terms.Bugzilla %] login has been changed.
+ [% ELSIF message_tag == "parameters_updated" %]
+ [% title = "Parameters Updated" %]
+ [% IF param_changed.size > 0 %]
+ [% FOREACH param = param_changed %]
+ Changed <em>[% param FILTER html %]</em><br>
+ [% END %]
+ [% ELSE %]
+ No changes made.
+ [% END %]
+
+ [% IF shutdown_is_active == 1 %]
+ <hr>
+ [% terms.Bugzilla %] has now been shut down. To re-enable the system,
+ clear the <em>shutdownhtml</em> field.
+ [% END%]
+
[% ELSIF message_tag == "password_change_cancelled" %]
[% title = "Cancel Request to Change Password" %]
Your request has been cancelled.
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 6cafb4895..22d7c8dcd 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -647,6 +647,10 @@
The maximum number of rows, '[% maxrows FILTER html %]', must be
a positive integer.
+ [% ELSIF error == "invalid_parameter" %]
+ [% title = "Invalid Parameter" %]
+ The new value for [% name FILTER html %] is invalid: [% err FILTER html %].
+
[% ELSIF error == "invalid_product_name" %]
[% title = "Invalid Product Name" %]
The product name '[% product FILTER html %]' is invalid or does not exist.