Merge with HEAD (currently labelled Groups_20020716_Sync3)
git-svn-id: svn://10.0.0.236/branches/Groups_20020716_Branch@129008 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -26,8 +26,7 @@ use strict;
|
||||
use DBI;
|
||||
use RelationSet;
|
||||
use vars qw($unconfirmedstate $legal_keywords);
|
||||
require "globals.pl";
|
||||
require "CGI.pl";
|
||||
|
||||
package Bug;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
my %ok_field;
|
||||
|
||||
@@ -30,11 +30,11 @@ package Bugzilla::Config;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Bugzilla::Config - Configuration paramaters for Bugzilla
|
||||
Bugzilla::Config - Configuration parameters for Bugzilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
# Getting paramaters
|
||||
# Getting parameters
|
||||
use Bugzilla::Config;
|
||||
|
||||
my $fooSetting = Param('foo');
|
||||
@@ -130,7 +130,11 @@ sub _load_datafiles {
|
||||
_load_datafiles();
|
||||
|
||||
# Load in the param defintions
|
||||
do 'defparams.pl';
|
||||
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;
|
||||
@@ -168,7 +172,7 @@ sub Param {
|
||||
|
||||
=item C<GetParamList()>
|
||||
|
||||
Returns the list of known paramater types, from defparams.pl. Users should not
|
||||
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
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
use strict;
|
||||
|
||||
require "globals.pl";
|
||||
require "CGI.pl";
|
||||
# The caller MUST require CGI.pl and globals.pl before using this
|
||||
|
||||
use vars qw($userid );
|
||||
|
||||
|
||||
@@ -862,10 +862,6 @@ sub ThrowCodeError {
|
||||
}
|
||||
|
||||
# For errors made by the user.
|
||||
# The correct use of this function is to pass an error tag, defined in
|
||||
# user-error.html.tmpl, as the first parameter, and then, optionally,
|
||||
# undef as the second parameter and $unlock_tables as the third.
|
||||
# The second parameter will eventually go away.
|
||||
sub ThrowUserError {
|
||||
($vars->{'error'}, my $unlock_tables) = (@_);
|
||||
|
||||
|
||||
@@ -88,7 +88,27 @@
|
||||
# example, --LOCAL-- is at least 3 times in this code! --TABLE--
|
||||
# also is used more than once. So search for every occurence!
|
||||
#
|
||||
|
||||
# To operate checksetup non-interactively, run it with a single argument
|
||||
# specifying a filename with the information usually obtained by
|
||||
# prompting the user or by editing localconfig. Only information
|
||||
# superceding defaults from LocalVar() function calls needs to be
|
||||
# specified.
|
||||
#
|
||||
# The format of that file is....
|
||||
#
|
||||
# $answer{'db_host'} = '$db_host = "localhost";
|
||||
# $db_port = 3306;
|
||||
# $db_name = "mydbname";
|
||||
# $db_user = "mydbuser";';
|
||||
#
|
||||
# $answer{'db_pass'} = q[$db_pass = 'mydbpass';];
|
||||
#
|
||||
# $answer{'ADMIN_OK'} = 'Y';
|
||||
# $answer{'ADMIN_EMAIL'} = 'myadmin@mydomain.net';
|
||||
# $answer{'ADMIN_PASSWORD'} = 'fooey';
|
||||
# $answer{'ADMIN_REALNAME'} = 'Joel Peshkin';
|
||||
#
|
||||
#
|
||||
|
||||
###########################################################################
|
||||
# Global definitions
|
||||
@@ -104,8 +124,18 @@ use Bugzilla::Config qw(:DEFAULT :admin);
|
||||
# this way we can look in the symbol table to see if they've been declared
|
||||
# yet or not.
|
||||
|
||||
use vars qw( $db_name );
|
||||
use vars qw( $db_name %answer );
|
||||
|
||||
###########################################################################
|
||||
# Non-interactive override
|
||||
###########################################################################
|
||||
my $silent;
|
||||
if ($ARGV[0]) {
|
||||
do $ARGV[0]
|
||||
or ($@ && die("Error $@ processing $ARGV[0]"))
|
||||
or die("Error $! processing $ARGV[0]");
|
||||
$silent = 1;
|
||||
}
|
||||
###########################################################################
|
||||
# Check required module
|
||||
###########################################################################
|
||||
@@ -114,7 +144,7 @@ use vars qw( $db_name );
|
||||
# Here we check for --MODULES--
|
||||
#
|
||||
|
||||
print "\nChecking perl modules ...\n";
|
||||
print "\nChecking perl modules ...\n" unless $silent;
|
||||
unless (eval "require 5.005") {
|
||||
die "Sorry, you need at least Perl 5.005\n";
|
||||
}
|
||||
@@ -155,7 +185,7 @@ sub have_vers {
|
||||
my ($pkg, $wanted) = @_;
|
||||
my ($msg, $vnum, $vstr);
|
||||
no strict 'refs';
|
||||
printf("Checking for %15s %-9s ", $pkg, !$wanted?'(any)':"(v$wanted)");
|
||||
printf("Checking for %15s %-9s ", $pkg, !$wanted?'(any)':"(v$wanted)") unless $silent;
|
||||
|
||||
eval { my $p; ($p = $pkg . ".pm") =~ s!::!/!g; require $p; };
|
||||
|
||||
@@ -173,7 +203,7 @@ sub have_vers {
|
||||
}
|
||||
|
||||
my $vok = (vers_cmp($vnum,$wanted) > -1);
|
||||
print ((($vok) ? "ok: " : " "), "$vstr\n");
|
||||
print ((($vok) ? "ok: " : " "), "$vstr\n") unless $silent;
|
||||
return $vok;
|
||||
}
|
||||
|
||||
@@ -218,36 +248,32 @@ my $modules = [
|
||||
];
|
||||
|
||||
my %missing = ();
|
||||
|
||||
# Modules may change $SIG{__DIE__} and $SIG{__WARN__}, so localise them here
|
||||
# so that later errors display 'normally'
|
||||
foreach my $module (@{$modules}) {
|
||||
local $::SIG{__DIE__};
|
||||
local $::SIG{__WARN__};
|
||||
unless (have_vers($module->{name}, $module->{version})) {
|
||||
$missing{$module->{name}} = $module->{version};
|
||||
}
|
||||
}
|
||||
|
||||
# If CGI::Carp was loaded successfully for version checking, it changes the
|
||||
# die and warn handlers, we don't want them changed, so we need to stash the
|
||||
# original ones and set them back afterwards -- justdave@syndicomm.com
|
||||
my $saved_die_handler = $::SIG{__DIE__};
|
||||
my $saved_warn_handler = $::SIG{__WARN__};
|
||||
unless (have_vers("CGI::Carp",0)) { $missing{'CGI::Carp'} = 0 }
|
||||
$::SIG{__DIE__} = $saved_die_handler;
|
||||
$::SIG{__WARN__} = $saved_warn_handler;
|
||||
|
||||
print "\nThe following Perl modules are optional:\n";
|
||||
print "\nThe following Perl modules are optional:\n" unless $silent;
|
||||
my $charts = 0;
|
||||
$charts++ if have_vers("GD","1.19");
|
||||
$charts++ if have_vers("Chart::Base","0.99");
|
||||
my $xmlparser = have_vers("XML::Parser",0);
|
||||
|
||||
print "\n";
|
||||
if ($charts != 2) {
|
||||
print "\n" unless $silent;
|
||||
if (($charts != 2) && !$silent) {
|
||||
print "If you you want to see graphical bug dependency charts, you may install\n",
|
||||
"the optional libgd and the Perl modules GD-1.19 and Chart::Base-0.99b, e.g. by\n",
|
||||
"running (as root)\n\n",
|
||||
" perl -MCPAN -e'install \"LDS/GD-1.19.tar.gz\"'\n",
|
||||
" perl -MCPAN -e'install \"N/NI/NINJAZ/Chart-0.99b.tar.gz\"'\n\n";
|
||||
}
|
||||
if (!$xmlparser) {
|
||||
if (!$xmlparser && !$silent) {
|
||||
print "If you want to use the bug import/export feature to move bugs to or from\n",
|
||||
"other bugzilla installations, you will need to install the XML::Parser module by\n",
|
||||
"running (as root)\n\n",
|
||||
@@ -298,7 +324,7 @@ if (%missing) {
|
||||
# Cute, ey?
|
||||
#
|
||||
|
||||
print "Checking user setup ...\n";
|
||||
print "Checking user setup ...\n" unless $silent;
|
||||
$@ = undef;
|
||||
do 'localconfig';
|
||||
if ($@) { # capture errors in localconfig, bug 97290
|
||||
@@ -326,7 +352,7 @@ sub LocalVar ($$)
|
||||
return if ($main::{$name}); # if localconfig declared it, we're done.
|
||||
$newstuff .= " " . $name;
|
||||
open FILE, '>>localconfig';
|
||||
print FILE $definition, "\n\n";
|
||||
print FILE ($answer{$name} or $definition), "\n\n";
|
||||
close FILE;
|
||||
}
|
||||
|
||||
@@ -486,7 +512,9 @@ LocalVar('opsys', '
|
||||
"Mac System 8.5",
|
||||
"Mac System 8.6",
|
||||
"Mac System 9.x",
|
||||
"MacOS X",
|
||||
"Mac OS X 10.0",
|
||||
"Mac OS X 10.1",
|
||||
"Mac OS X 10.2",
|
||||
"Linux",
|
||||
"BSDI",
|
||||
"FreeBSD",
|
||||
@@ -580,7 +608,7 @@ my @my_priorities = @{*{$main::{'priorities'}}{ARRAY}};
|
||||
my @my_platforms = @{*{$main::{'platforms'}}{ARRAY}};
|
||||
my @my_opsys = @{*{$main::{'opsys'}}{ARRAY}};
|
||||
|
||||
if ($my_webservergroup) {
|
||||
if ($my_webservergroup && !$silent) {
|
||||
if ($< != 0) { # zach: if not root, yell at them, bug 87398
|
||||
print <<EOF;
|
||||
|
||||
@@ -599,7 +627,7 @@ EOF
|
||||
# However, if we're being run on windows, then this option doesn't
|
||||
# really make sense. Doesn't make it any more secure either, though,
|
||||
# but don't print the message, since they can't do anything about it.
|
||||
if ($^O !~ /MSWin32/i) {
|
||||
if (($^O !~ /MSWin32/i) && !$silent) {
|
||||
print <<EOF;
|
||||
|
||||
********************************************************************************
|
||||
@@ -651,8 +679,8 @@ $::ENV{'PATH'} = $origPath;
|
||||
|
||||
# The |require "globals.pl"| above ends up creating a template object with
|
||||
# a COMPILE_DIR of 'data'. This means that TT creates the directory for us,
|
||||
# so this code wouldn't run if we just checked for the existance of the
|
||||
# directory. Instead, check for the existance of 'data/nomail', which is
|
||||
# so this code wouldn't run if we just checked for the existence of the
|
||||
# directory. Instead, check for the existence of 'data/nomail', which is
|
||||
# created in this block
|
||||
unless (-d 'data' && -e 'data/nomail') {
|
||||
print "Creating data directory ...\n";
|
||||
@@ -938,7 +966,7 @@ END
|
||||
}
|
||||
|
||||
{
|
||||
print "Precompiling templates ...\n";
|
||||
print "Precompiling templates ...\n" unless $silent;
|
||||
|
||||
use File::Find;
|
||||
|
||||
@@ -1096,7 +1124,8 @@ sub fixPerms {
|
||||
|
||||
if ($my_webservergroup) {
|
||||
# Funny! getgrname returns the GID if fed with NAME ...
|
||||
my $webservergid = getgrnam($my_webservergroup);
|
||||
my $webservergid = getgrnam($my_webservergroup)
|
||||
or die("no such group: $my_webservergroup");
|
||||
# chown needs to be called with a valid uid, not 0. $< returns the
|
||||
# caller's uid. Maybe there should be a $bugzillauid, and call with that
|
||||
# userid.
|
||||
@@ -1184,7 +1213,7 @@ if ($my_db_check) {
|
||||
or die "Can't connect to the $db_base database. Is the database " .
|
||||
"installed and\nup and running? Do you have the correct username " .
|
||||
"and password selected in\nlocalconfig?\n\n";
|
||||
printf("Checking for %15s %-9s ", "MySQL Server", "(v$sql_want)");
|
||||
printf("Checking for %15s %-9s ", "MySQL Server", "(v$sql_want)") unless $silent;
|
||||
my $qh = $dbh->prepare("SELECT VERSION()");
|
||||
$qh->execute;
|
||||
my ($sql_vers) = $qh->fetchrow_array;
|
||||
@@ -1193,7 +1222,7 @@ if ($my_db_check) {
|
||||
# Check what version of MySQL is installed and let the user know
|
||||
# if the version is too old to be used with Bugzilla.
|
||||
if ( vers_cmp($sql_vers,$sql_want) > -1 ) {
|
||||
print "ok: found v$sql_vers\n";
|
||||
print "ok: found v$sql_vers\n" unless $silent;
|
||||
} else {
|
||||
die "Your MySQL server v$sql_vers is too old./n" .
|
||||
" Bugzilla requires version $sql_want or later of MySQL.\n" .
|
||||
@@ -1257,7 +1286,7 @@ if( Param('webdotbase') && Param('webdotbase') !~ /^https?:/ ) {
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
print "\n" unless $silent;
|
||||
|
||||
|
||||
###########################################################################
|
||||
@@ -2577,7 +2606,7 @@ $sth = $dbh->prepare("SELECT count(*) from duplicates");
|
||||
$sth->execute();
|
||||
if (!($sth->fetchrow_arrayref()->[0])) {
|
||||
# populate table
|
||||
print("Populating duplicates table...\n");
|
||||
print("Populating duplicates table...\n") unless $silent;
|
||||
|
||||
$sth = $dbh->prepare("SELECT longdescs.bug_id, thetext FROM longdescs left JOIN bugs using(bug_id) WHERE (thetext " .
|
||||
"regexp '[.*.]{3,3} This bug has been marked as a duplicate of [[:digit:]]{1,5} [.*.]{3,3}') AND (resolution = 'DUPLICATE') ORDER" .
|
||||
@@ -3335,7 +3364,9 @@ if ($sth->rows == 0) {
|
||||
while(! $admin_ok ) {
|
||||
while( $login eq "" ) {
|
||||
print "Enter the e-mail address of the administrator: ";
|
||||
$login = <STDIN>;
|
||||
$login = $answer{'ADMIN_EMAIL'}
|
||||
|| ($silent && die("cant preload ADMIN_EMAIL"))
|
||||
|| <STDIN>;
|
||||
chomp $login;
|
||||
if(! $login ) {
|
||||
print "\nYou DO want an administrator, don't you?\n";
|
||||
@@ -3359,7 +3390,9 @@ _End_Of_SQL_
|
||||
if ($sth->rows > 0) {
|
||||
print "$login already has an account.\n";
|
||||
print "Make this user the administrator? [Y/n] ";
|
||||
my $ok = <STDIN>;
|
||||
my $ok = $answer{'ADMIN_OK'}
|
||||
|| ($silent && die("cant preload ADMIN_OK"))
|
||||
|| <STDIN>;
|
||||
chomp $ok;
|
||||
if ($ok !~ /^n/i) {
|
||||
$admin_ok = 1;
|
||||
@@ -3370,7 +3403,9 @@ _End_Of_SQL_
|
||||
}
|
||||
} else {
|
||||
print "You entered $login. Is this correct? [Y/n] ";
|
||||
my $ok = <STDIN>;
|
||||
my $ok = $answer{'ADMIN_OK'}
|
||||
|| ($silent && die("cant preload ADMIN_OK"))
|
||||
|| <STDIN>;
|
||||
chomp $ok;
|
||||
if ($ok !~ /^n/i) {
|
||||
$admin_ok = 1;
|
||||
@@ -3385,7 +3420,9 @@ _End_Of_SQL_
|
||||
|
||||
while( $realname eq "" ) {
|
||||
print "Enter the real name of the administrator: ";
|
||||
$realname = <STDIN>;
|
||||
$realname = $answer{'ADMIN_REALNAME'}
|
||||
|| ($silent && die("cant preload ADMIN_REALNAME"))
|
||||
|| <STDIN>;
|
||||
chomp $realname;
|
||||
if(! $realname ) {
|
||||
print "\nReally. We need a full name.\n";
|
||||
@@ -3403,7 +3440,9 @@ _End_Of_SQL_
|
||||
while( $pass1 ne $pass2 ) {
|
||||
while( $pass1 eq "" || $pass1 !~ /^[a-zA-Z0-9-_]{3,16}$/ ) {
|
||||
print "Enter a password for the administrator account: ";
|
||||
$pass1 = <STDIN>;
|
||||
$pass1 = $answer{'ADMIN_PASSWORD'}
|
||||
|| ($silent && die("cant preload ADMIN_PASSWORD"))
|
||||
|| <STDIN>;
|
||||
chomp $pass1;
|
||||
if(! $pass1 ) {
|
||||
print "\n\nIt's just plain stupid to not have a password. Try again!\n";
|
||||
@@ -3412,7 +3451,9 @@ _End_Of_SQL_
|
||||
}
|
||||
}
|
||||
print "\nPlease retype the password to verify: ";
|
||||
$pass2 = <STDIN>;
|
||||
$pass2 = $answer{'ADMIN_PASSWORD'}
|
||||
|| ($silent && die("cant preload ADMIN_PASSWORD"))
|
||||
|| <STDIN>;
|
||||
chomp $pass2;
|
||||
if ($pass1 ne $pass2) {
|
||||
print "\n\nPasswords don't match. Try again!\n";
|
||||
@@ -3493,4 +3534,4 @@ $dbh->do("UPDATE components SET initialowner = $adminuid WHERE initialowner = 0"
|
||||
|
||||
unlink "data/versioncache";
|
||||
|
||||
print "Reminder: Bugzilla now requires version 8.7 or later of sendmail.\n";
|
||||
print "Reminder: Bugzilla now requires version 8.7 or later of sendmail.\n" unless $silent;
|
||||
|
||||
@@ -116,7 +116,7 @@ my $Body = "Subject: " . $Subject . "\n" . $Comment;
|
||||
my $long_desc_query = "INSERT INTO longdescs SET bug_id=$found_id, who=$userid, bug_when=NOW(), thetext=" . SqlQuote($Body) . ";";
|
||||
SendSQL($long_desc_query);
|
||||
|
||||
system("cd .. ; ./processmail $found_id '$SenderShort'");
|
||||
system("./processmail", $found_id, $SenderShort);
|
||||
|
||||
sub DealWithError {
|
||||
my ($reason) = @_;
|
||||
|
||||
@@ -1009,7 +1009,7 @@ sub quoteUrls {
|
||||
}
|
||||
|
||||
# GetBugLink creates a link to a bug, including its title.
|
||||
# It takes either two or three paramaters:
|
||||
# It takes either two or three parameters:
|
||||
# - The bug number
|
||||
# - The link text, to place between the <a>..</a>
|
||||
# - An optional comment number, for linking to a particular
|
||||
@@ -1339,7 +1339,7 @@ sub GroupIsActive {
|
||||
}
|
||||
|
||||
# Determines if the given bug_status string represents an "Opened" bug. This
|
||||
# routine ought to be paramaterizable somehow, as people tend to introduce
|
||||
# routine ought to be parameterizable somehow, as people tend to introduce
|
||||
# new states into Bugzilla.
|
||||
|
||||
sub IsOpenedState {
|
||||
|
||||
@@ -25,8 +25,12 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
use Bug;
|
||||
require "CGI.pl";
|
||||
|
||||
use vars qw($userid %COOKIE);
|
||||
|
||||
use Bug;
|
||||
|
||||
$::lockcount = 0;
|
||||
|
||||
unless ( Param("move-enabled") ) {
|
||||
|
||||
@@ -39,19 +39,15 @@ ConnectToDatabase();
|
||||
|
||||
quietly_check_login();
|
||||
|
||||
print "Content-Type: text/html\n\n";
|
||||
|
||||
if (defined $::FORM{'id'}) {
|
||||
$::FORM{'id'} =~ s/[^\w-]//g;
|
||||
|
||||
if ($pages{$::FORM{'id'}}) {
|
||||
print "Content-Type: text/html\n\n";
|
||||
$template->process($pages{$::FORM{'id'}}, $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$vars->{'message'} = "page_not_found";
|
||||
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
ThrowUserError("page_not_found");
|
||||
|
||||
@@ -1420,7 +1420,7 @@ foreach my $id (@idlist) {
|
||||
SendSQL("SELECT who FROM cc WHERE bug_id = " . SqlQuote($duplicate) . " and who = $reporter");
|
||||
my $isoncc = FetchOneColumn();
|
||||
unless ($isreporter || $isoncc || ! $::FORM{'confirm_add_duplicate'}) {
|
||||
# The reporter is oblivious to the existance of the new bug and is permitted access
|
||||
# The reporter is oblivious to the existence of the new bug and is permitted access
|
||||
# ... add 'em to the cc (and record activity)
|
||||
LogActivityEntry($duplicate,"cc","",DBID_to_name($reporter));
|
||||
SendSQL("INSERT INTO cc (who, bug_id) VALUES ($reporter, " . SqlQuote($duplicate) . ")");
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
|
||||
[%# INTERFACE:
|
||||
# header_done: boolean. True if the header has already been printed.
|
||||
# error: string. The tag of the error, or the error message to be displayed
|
||||
# (deprecated). May contain HTML if it's an error message.
|
||||
# title: string. If error is an error message, the title (deprecated.)
|
||||
# error: string. The tag of the error.
|
||||
# variables: hash. Useful data about the problem. The keys are the variable
|
||||
# names, and the values the variable values.
|
||||
#%]
|
||||
@@ -72,7 +70,7 @@
|
||||
[%# Give sensible error if error functions are used incorrectly.
|
||||
#%]
|
||||
You are using Bugzilla's ThrowCodeError() function incorrectly. You
|
||||
passed in the string '[% message_tag %]'. The correct use is to pass
|
||||
passed in the string '[% error %]'. The correct use is to pass
|
||||
in a tag, and define that tag in the file code-error.html.tmpl.<br>
|
||||
<br>
|
||||
If you are a Bugzilla end-user seeing this message, please save this
|
||||
|
||||
@@ -45,14 +45,8 @@
|
||||
also bookmark the result of any individual query.
|
||||
|
||||
[% ELSIF message_tag == "buglist_new_named_query" %]
|
||||
OK, you have a new query named <code>[% queryname FILTER html %]</code>."
|
||||
OK, you have a new query named <code>[% queryname FILTER html %]</code>.
|
||||
|
||||
[% ELSIF message_tag == "buglist_parameters_required" %]
|
||||
[% title = "Parameters Required" %]
|
||||
[% url = "query.cgi" %]
|
||||
[% link = "Please use the search form to specify some search criteria." %]
|
||||
This script is not meant to be invoked without any search terms.
|
||||
|
||||
[% ELSIF message_tag == "buglist_query_gone" %]
|
||||
[% title = "Query is gone" %]
|
||||
[% link = "Go back to the query page." %]
|
||||
@@ -194,53 +188,6 @@
|
||||
[% title = "Bugzilla Login Changed" %]
|
||||
Your Bugzilla login has been changed.
|
||||
|
||||
[% ELSIF message_tag == "page_not_found" %]
|
||||
[% title = "Page not found" %]
|
||||
The page you requested cannot be found.
|
||||
|
||||
[% ELSIF message_tag == "milestone_required" %]
|
||||
[% title = "Milestone Required" %]
|
||||
You must determine a target milestone for bug [% bug_id %]
|
||||
if you are going to accept it. Part of accepting
|
||||
a bug is giving an estimate of when it will be fixed.
|
||||
|
||||
[% ELSIF message_tag == "missing_email_type" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
You must specify one or more fields in which to search for
|
||||
<tt>[% email %]</tt>.
|
||||
|
||||
[% ELSIF message_tag == "need_component" %]
|
||||
[% title = "Component Required" %]
|
||||
You must specify a component to help determine the new owner of these bugs.
|
||||
[% ELSIF message_tag == "need_product" %]
|
||||
[% title = "Product Required" %]
|
||||
You must specify a product to help determine the new owner of these bugs.
|
||||
[% ELSIF message_tag == "no_bugs_chosen" %]
|
||||
[% title = "No Bugs Chosen" %]
|
||||
You apparently didn't choose any bugs to modify.
|
||||
|
||||
[% ELSIF message_tag == "no_dupe_stats" %]
|
||||
[% title = "Cannot Find Duplicate Statistics" %]
|
||||
There are no duplicate statistics for today ([% today %]) or yesterday.
|
||||
|
||||
[% ELSIF message_tag == "no_dupe_stats_error_today" %]
|
||||
[% title = "Error Reading Today's Dupes File" %]
|
||||
An error occurred opening today's dupes file: [% error_msg FILTER html %].
|
||||
|
||||
[% ELSIF message_tag == "no_dupe_stats_error_whenever" %]
|
||||
[% title = "Error Reading Previous Dupes File" %]
|
||||
An error occurred opening $changedsince days ago ($whenever)'s dupes file:
|
||||
[% error_msg FILTER html %].
|
||||
|
||||
[% ELSIF message_tag == "no_dupe_stats_error_yesterday" %]
|
||||
[% title = "Error Reading Yesterday's Dupes File" %]
|
||||
There are no duplicate statistics for today ([% today %]), and an error
|
||||
occurred opening yesterday's dupes file: [% error_msg FILTER html %].
|
||||
|
||||
[% ELSIF message_tag == "password_changed" %]
|
||||
[% title = "Password Changed" %]
|
||||
Your password has been changed.
|
||||
|
||||
[% ELSIF message_tag == "password_change_canceled" %]
|
||||
[% title = "Cancel Request to Change Password" %]
|
||||
Your request has been cancelled.
|
||||
@@ -250,25 +197,18 @@
|
||||
A token for changing your password has been emailed to you.
|
||||
Follow the instructions in that email to change your password.
|
||||
|
||||
[% ELSIF message_tag == "reassign_to_empty" %]
|
||||
[% title = "Illegal Reassignment" %]
|
||||
You cannot reassign to a bug to nobody. Unless you
|
||||
intentionally cleared out the "Reassign bug to"
|
||||
field, [% Param("browserbugmessage") %]
|
||||
[% ELSIF message_tag == "password_changed" %]
|
||||
[% title = "Password Changed" %]
|
||||
Your password has been changed.
|
||||
|
||||
[% ELSIF message_tag == "shutdown" %]
|
||||
[% title = "Bugzilla is Down" %]
|
||||
[% Param("shutdownhtml") %]
|
||||
|
||||
[% ELSIF message_tag == "unknown_keyword" %]
|
||||
[% title = "Unknown Keyword" %]
|
||||
<code>[% keyword FILTER html %]</code> is not a known keyword.
|
||||
The legal keyword names are <a href="describekeywords.cgi">listed here</a>.
|
||||
|
||||
[% ELSE %]
|
||||
[%# Give sensible error if error functions are used incorrectly.
|
||||
#%]
|
||||
You are using Bugzilla's error-reporting functions incorrectly. You
|
||||
You are using Bugzilla's messaging functions incorrectly. You
|
||||
passed in the string '[% message_tag %]'. The correct use is to pass
|
||||
in a tag, and define that tag in the file messages.html.tmpl.<br>
|
||||
<br>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
# header_done: boolean. True if the header has already been printed.
|
||||
# error: string. The tag of the error, or the error message to be displayed
|
||||
# (deprecated). May contain HTML if it's an error message.
|
||||
# title: string. If error is an error message, the title (deprecated.)
|
||||
#%]
|
||||
|
||||
[%# This is a list of all the possible user errors. Please keep them in
|
||||
@@ -40,10 +39,182 @@
|
||||
to any [% parameters %] which you may have set before calling
|
||||
ThrowUserError.
|
||||
|
||||
[% ELSIF error == "another_error_tag" %]
|
||||
[% title = "Another Error" %]
|
||||
This is another sample error. It can be removed.
|
||||
[% ELSIF error == "account_disabled" %]
|
||||
[% title = "Account Disabled" %]
|
||||
[% disabledreason %]
|
||||
<hr>
|
||||
If you believe your account should be restored, please
|
||||
send email to [% Param("maintainer") %] explaining why.
|
||||
|
||||
[% ELSIF error == "account_exists" %]
|
||||
[% title = "Account Already Exists" %]
|
||||
That account already exists.
|
||||
|
||||
[% ELSIF error == "alias_has_comma_or_space" %]
|
||||
[% title = "Invalid Characters In Alias" %]
|
||||
The alias you entered, <em>[% alias FILTER html %]</em>,
|
||||
contains one or more commas or spaces. Aliases cannot contain
|
||||
commas or spaces because those characters are used to separate
|
||||
aliases from each other in lists. Please choose another alias
|
||||
that does not contain commas and spaces.
|
||||
|
||||
[% ELSIF error == "alias_in_use" %]
|
||||
[% title = "Alias In Use" %]
|
||||
[% bug_link %] has already taken the alias
|
||||
<em>[% alias FILTER html %]</em>. Please choose another one.
|
||||
|
||||
[% ELSIF error == "alias_is_numeric" %]
|
||||
[% title = "Alias Is Numeric" %]
|
||||
You tried to give this bug the alias <em>[% alias FILTER html %]</em>,
|
||||
but aliases cannot be merely numbers, since they could
|
||||
then be confused with bug IDs. Please choose another
|
||||
alias containing at least one letter.
|
||||
|
||||
[% ELSIF error == "alias_too_long" %]
|
||||
[% title = "Alias Too Long" %]
|
||||
Bug aliases cannot be longer than 20 characters.
|
||||
Please choose a shorter alias.
|
||||
|
||||
[% ELSIF error == "buglist_parameters_required" %]
|
||||
[% title = "Parameters Required" %]
|
||||
[% url = "query.cgi" %]
|
||||
[% link = "Please use the search form to specify some search criteria." %]
|
||||
This script is not meant to be invoked without any search terms.
|
||||
|
||||
[% ELSIF error == "bugs_not_changed" %]
|
||||
[% title = "Bugs Not Changed" %]
|
||||
Um, you apparently did not change anything on the selected bugs.
|
||||
|
||||
[% ELSIF error == "comment_required" %]
|
||||
[% title = "Comment Required" %]
|
||||
You have to specify a <b>comment</b> on this change.
|
||||
Please give some words on the reason for your change.
|
||||
|
||||
[% ELSIF error == "dependency_loop_multi" %]
|
||||
[% title = "Dependency Loop Detected" %]
|
||||
The following bug(s) would appear on both the "depends on"
|
||||
and "blocks" parts of the dependency tree if these changes
|
||||
are committed: [% both %]. This would create a circular
|
||||
dependency, which is not allowed.
|
||||
|
||||
[% ELSIF error == "dependency_loop_single" %]
|
||||
[% title = "Dependency Loop Detected" %]
|
||||
You can't make a bug blocked or dependent on itself.
|
||||
|
||||
[% ELSIF error == "dupe_invalid_bug_id" %]
|
||||
[% title = "Valid Bug Number Required" %]
|
||||
You must specify a valid bug number of which this bug
|
||||
is a duplicate. The bug has not been changed.
|
||||
|
||||
[% ELSIF error == "dupe_of_self_disallowed" %]
|
||||
[% title = "Nice Try..." %]
|
||||
Nice try, [% user.login FILTER html %], but it doesn't
|
||||
really make sense to mark a bug as a duplicate of itself,
|
||||
does it?
|
||||
|
||||
[% ELSIF error == "illegal_at_least_x_votes" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
The <em>At least ___ votes</em> field must be a simple number.
|
||||
You entered <tt>[% value FILTER html %]</tt>, which isn't.
|
||||
|
||||
[% ELSIF error == "illegal_attachment_is_patch" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
The only legal values for the <em>Attachment is patch</em> field are
|
||||
0 and 1.
|
||||
|
||||
[% ELSIF error == "illegal_change" %]
|
||||
You tried to change the <strong>[% field %]</strong> field
|
||||
from <em>[% oldvalue FILTER html %]</em> to
|
||||
<em>[% newvalue FILTER html %]</em>,
|
||||
but only the owner or submitter of the bug, or a
|
||||
sufficiently empowered user, may change that field.
|
||||
|
||||
[% ELSIF error == "illegal_changed_in_last_x_days" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
The <em>Changed in last ___ days</em> field must be a simple number.
|
||||
You entered <tt>[% value FILTER html %]</tt>, which isn't.
|
||||
|
||||
[% ELSIF error == "illegal_date" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
'<tt>[% date %]</tt>' is not a legal date.
|
||||
|
||||
[% ELSIF error == "illegal_email_address" %]
|
||||
[% title = "Invalid Email Address" %]
|
||||
The e-mail address you entered(<b>[% addr FILTER html %]</b>)
|
||||
didn't pass our syntax checking for a legal email address.
|
||||
[% Param('emailregexpdesc') %]
|
||||
It must also not contain any of these special characters:
|
||||
<tt>\ ( ) & < > , ; : " [ ]</tt>, or any whitespace.
|
||||
|
||||
[% ELSIF error == "illegal_is_obsolete" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
The only legal values for the <em>Attachment is obsolete</em> field are
|
||||
0 and 1.
|
||||
|
||||
[% ELSIF error == "invalid_bug_id" %]
|
||||
[% title = "Invalid Bug ID" %]
|
||||
The bug id [% bug_id FILTER html %] is invalid.
|
||||
|
||||
[% ELSIF error == "invalid_username" %]
|
||||
[% title = "Invalid Username" %]
|
||||
The name <tt>[% name FILTER html %]</tt> is not a valid username.
|
||||
Either you misspelled it, or the person has not
|
||||
registered for a Bugzilla account.
|
||||
|
||||
[% ELSIF error == "milestone_required" %]
|
||||
[% title = "Milestone Required" %]
|
||||
You must determine a target milestone for bug [% bug_id %]
|
||||
if you are going to accept it. Part of accepting
|
||||
a bug is giving an estimate of when it will be fixed.
|
||||
|
||||
[% ELSIF error == "missing_email_type" %]
|
||||
[% title = "Your Query Makes No Sense" %]
|
||||
You must specify one or more fields in which to search for
|
||||
<tt>[% email %]</tt>.
|
||||
|
||||
[% ELSIF error == "need_component" %]
|
||||
[% title = "Component Required" %]
|
||||
You must specify a component to help determine the new owner of these bugs.
|
||||
[% ELSIF error == "need_product" %]
|
||||
[% title = "Product Required" %]
|
||||
You must specify a product to help determine the new owner of these bugs.
|
||||
[% ELSIF error == "no_bugs_chosen" %]
|
||||
[% title = "No Bugs Chosen" %]
|
||||
You apparently didn't choose any bugs to modify.
|
||||
|
||||
[% ELSIF error == "no_dupe_stats" %]
|
||||
[% title = "Cannot Find Duplicate Statistics" %]
|
||||
There are no duplicate statistics for today ([% today %]) or yesterday.
|
||||
|
||||
[% ELSIF error == "no_dupe_stats_error_today" %]
|
||||
[% title = "Error Reading Today's Dupes File" %]
|
||||
An error occurred opening today's dupes file: [% error_msg FILTER html %].
|
||||
|
||||
[% ELSIF error == "no_dupe_stats_error_whenever" %]
|
||||
[% title = "Error Reading Previous Dupes File" %]
|
||||
An error occurred opening $changedsince days ago ($whenever)'s dupes file:
|
||||
[% error_msg FILTER html %].
|
||||
|
||||
[% ELSIF error == "no_dupe_stats_error_yesterday" %]
|
||||
[% title = "Error Reading Yesterday's Dupes File" %]
|
||||
There are no duplicate statistics for today ([% today %]), and an error
|
||||
occurred opening yesterday's dupes file: [% error_msg FILTER html %].
|
||||
|
||||
[% ELSIF error == "page_not_found" %]
|
||||
[% title = "Page not found" %]
|
||||
The page you requested cannot be found.
|
||||
|
||||
[% ELSIF error == "reassign_to_empty" %]
|
||||
[% title = "Illegal Reassignment" %]
|
||||
You cannot reassign to a bug to nobody. Unless you
|
||||
intentionally cleared out the "Reassign bug to"
|
||||
field, [% Param("browserbugmessage") %]
|
||||
|
||||
[% ELSIF error == "unknown_keyword" %]
|
||||
[% title = "Unknown Keyword" %]
|
||||
<code>[% keyword FILTER html %]</code> is not a known keyword.
|
||||
The legal keyword names are <a href="describekeywords.cgi">listed here</a>.
|
||||
|
||||
[% ELSE %]
|
||||
[%# Cope with legacy calling convention, where "error" was the string
|
||||
# to print.
|
||||
|
||||
@@ -26,10 +26,11 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
use Bug;
|
||||
require "CGI.pl";
|
||||
|
||||
use vars qw($template $vars);
|
||||
use Bug;
|
||||
|
||||
use vars qw($template $vars $userid %COOKIE);
|
||||
|
||||
ConnectToDatabase();
|
||||
quietly_check_login();
|
||||
|
||||
Reference in New Issue
Block a user