Commit b8f2c324 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 46296: Make editparams.cgi be multi-panel by category - Patch by Frédéric…

Bug 46296: Make editparams.cgi be multi-panel by category - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel a=justdave
parent 5eee7ab7
......@@ -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
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
# -*- 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;
#!/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();
......@@ -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());
#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;
}
[%# 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
[%# 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
[%# 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." }
%]
[%# 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
[%# 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." }
%]
[%# 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>
[%# 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
[%# 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
[%# 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 %]
[%# 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?" }
%]
[%# 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." }
%]
[%# 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." }
%]
[%# 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)." }
%]
[%# 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." }
%]
[%# 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." }
%]
[%# 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." }
%]
[%# 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." }
%]
......@@ -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.
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment