Bug 65346 (fix keyword search - Search.pm), Bug 65323 (change print cgi->header to cgi->send_header and do it automatically on template process)
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@799 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
2623ee0bab
commit
92393aae6f
|
@ -356,6 +356,13 @@ sub cgi {
|
|||
return $class->request_cache->{cgi};
|
||||
}
|
||||
|
||||
sub send_header {
|
||||
my $class = shift;
|
||||
return undef if $class->usage_mode == USAGE_MODE_EMAIL;
|
||||
my $cgi = $class->cgi;
|
||||
$cgi->{_header_sent} || $cgi->send_header(@_);
|
||||
}
|
||||
|
||||
sub input_params {
|
||||
my ($class, $params) = @_;
|
||||
my $cache = $class->request_cache;
|
||||
|
|
|
@ -36,7 +36,7 @@ sub process_diff {
|
|||
require PatchReader::DiffPrinter::raw;
|
||||
$last_reader->sends_data_to(new PatchReader::DiffPrinter::raw());
|
||||
# Actually print out the patch.
|
||||
print $cgi->header(-type => 'text/plain',
|
||||
$cgi->send_header(-type => 'text/plain',
|
||||
-expires => '+3M');
|
||||
disable_utf8();
|
||||
$reader->iterate_string('Attachment ' . $attachment->id, $attachment->data);
|
||||
|
@ -117,7 +117,7 @@ sub process_interdiff {
|
|||
require PatchReader::DiffPrinter::raw;
|
||||
$last_reader->sends_data_to(new PatchReader::DiffPrinter::raw());
|
||||
# Actually print out the patch.
|
||||
print $cgi->header(-type => 'text/plain',
|
||||
$cgi->send_header(-type => 'text/plain',
|
||||
-expires => '+3M');
|
||||
disable_utf8();
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ sub setup_template_patch_reader {
|
|||
&& Bugzilla->params->{'cvsroot_get'} && !$vars->{'newid'};
|
||||
|
||||
# Print everything out.
|
||||
print $cgi->header(-type => 'text/html',
|
||||
$cgi->send_header(-type => 'text/html',
|
||||
-expires => '+3M');
|
||||
|
||||
$last_reader->sends_data_to(new PatchReader::DiffPrinter::template($template,
|
||||
|
|
|
@ -61,7 +61,7 @@ sub fail_nodata {
|
|||
ThrowUserError('login_required');
|
||||
}
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("account/auth/login.html.tmpl",
|
||||
{ 'target' => $cgi->url(-relative=>1) })
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -1455,7 +1455,7 @@ sub _check_dup_id {
|
|||
$vars->{'cclist_accessible'} = $dupe_of_bug->cclist_accessible;
|
||||
$vars->{'original_bug_id'} = $dupe_of;
|
||||
$vars->{'duplicate_bug_id'} = $self->id;
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("bug/process/confirm-duplicate.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
|
|
@ -89,7 +89,7 @@ sub new {
|
|||
# multipart requests, and so should never happen unless there is a
|
||||
# browser bug.
|
||||
|
||||
print $self->header(-status => $err);
|
||||
$self->send_header(-status => $err);
|
||||
|
||||
# ThrowCodeError wants to print the header, so it grabs Bugzilla->cgi
|
||||
# which creates a new Bugzilla::CGI object, which fails again, which
|
||||
|
@ -288,6 +288,43 @@ sub header {
|
|||
return $self->SUPER::header(@_) || "";
|
||||
}
|
||||
|
||||
# Various send_* functions for tracing sent headers
|
||||
|
||||
sub send_header
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{_header_sent} = 1;
|
||||
print $self->header(@_);
|
||||
}
|
||||
|
||||
sub send_multipart_start
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{_header_sent} = 1;
|
||||
print $self->multipart_start(@_);
|
||||
}
|
||||
|
||||
sub send_multipart_init
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{_header_sent} = 1;
|
||||
print $self->multipart_init(@_);
|
||||
}
|
||||
|
||||
sub send_multipart_end
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{_header_sent} = 1;
|
||||
print $self->multipart_end(@_);
|
||||
}
|
||||
|
||||
sub send_multipart_final
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{_header_sent} = 1;
|
||||
print $self->multipart_final(@_);
|
||||
}
|
||||
|
||||
sub param {
|
||||
my $self = shift;
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ sub _throw_error
|
|||
|
||||
if ($mode == ERROR_MODE_WEBPAGE)
|
||||
{
|
||||
print Bugzilla->cgi->header();
|
||||
Bugzilla->send_header;
|
||||
print $message;
|
||||
}
|
||||
elsif ($mode == ERROR_MODE_DIE_SOAP_FAULT || $mode == ERROR_MODE_JSON_RPC)
|
||||
|
@ -206,6 +206,7 @@ sub _throw_error
|
|||
$err->{'error'} = $error;
|
||||
$err->{'message'} = $message;
|
||||
my $json = new JSON;
|
||||
Bugzilla->send_header;
|
||||
print $json->encode($err);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2002,13 +2002,12 @@ sub _keywords_nonchanged {
|
|||
|
||||
my $k_table = "keywords_$$chartid";
|
||||
my $kd_table = "keyworddefs_$$chartid";
|
||||
|
||||
push(@$supptables, "LEFT JOIN keywords AS $k_table " .
|
||||
"ON $k_table.bug_id = bugs.bug_id");
|
||||
push(@$supptables, "LEFT JOIN keyworddefs AS $kd_table " .
|
||||
"ON $kd_table.id = $k_table.keywordid");
|
||||
|
||||
$$f = "$kd_table.name";
|
||||
|
||||
# CustIS Bug 65346 - keyword search is broken in 3.6
|
||||
|
||||
$$f = "(SELECT IFNULL(GROUP_CONCAT($kd_table.name SEPARATOR ' '), '') FROM keywords AS $k_table " .
|
||||
" LEFT JOIN keyworddefs AS $kd_table ON $kd_table.id=$k_table.keywordid" .
|
||||
" WHERE $k_table.bug_id = bugs.bug_id)";
|
||||
}
|
||||
|
||||
sub _dependson_nonchanged {
|
||||
|
|
|
@ -993,6 +993,20 @@ sub _do_template_symlink {
|
|||
}
|
||||
}
|
||||
|
||||
# Helper for $template->process()
|
||||
# Automatically sends CGI header
|
||||
sub process
|
||||
{
|
||||
my $self = shift;
|
||||
my ($template, $vars, $output) = @_;
|
||||
if (!$output)
|
||||
{
|
||||
# if outputting via print(), check for sent header
|
||||
Bugzilla->send_header;
|
||||
}
|
||||
$self->SUPER::process(@_);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
|
|
@ -215,7 +215,7 @@ sub check_hash_token {
|
|||
$vars->{'reason'} = (!$token) ? 'missing_token' :
|
||||
($expected_token ne $token) ? 'invalid_token' :
|
||||
'expired_token';
|
||||
print Bugzilla->cgi->header();
|
||||
Bugzilla->cgi->send_header();
|
||||
$template->process('global/confirm-action.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -396,7 +396,7 @@ sub check_token_data {
|
|||
$cgi->param('token', $token);
|
||||
}
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process('admin/confirm-action.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -1414,7 +1414,7 @@ sub match_field {
|
|||
$vars->{'matchsuccess'} = $matchsuccess; # continue or fail
|
||||
$vars->{'matchmultiple'} = $match_multiple;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("global/confirm-user-match.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -71,7 +71,7 @@ sub response {
|
|||
}
|
||||
}
|
||||
my $cgi = $self->cgi;
|
||||
print $cgi->header(-status => $response->code, @header_args);
|
||||
$cgi->send_header(-status => $response->code, @header_args);
|
||||
print $response->content;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $template = Bugzilla->template;
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('admin')
|
||||
|| $user->in_group('tweakparams')
|
||||
|
|
|
@ -155,7 +155,7 @@ sub validateID {
|
|||
# prompt them with a page that allows them to choose an attachment.
|
||||
# Happens when calling plain attachment.cgi from the urlbar directly
|
||||
if ($param eq 'id' && !$cgi->param('id')) {
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("attachment/choose.html.tmpl", $vars) ||
|
||||
ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -344,7 +344,7 @@ sub view {
|
|||
# charset that's a single space.
|
||||
$cgi->charset(' ');
|
||||
}
|
||||
print $cgi->header(-type=>"$contenttype; name=\"$filename\"",
|
||||
$cgi->send_header(-type=>"$contenttype; name=\"$filename\"",
|
||||
-content_disposition=> "$disposition; filename=\"$filename\"",
|
||||
-content_length => $attachment->datasize);
|
||||
disable_utf8();
|
||||
|
@ -390,7 +390,7 @@ sub viewall {
|
|||
$vars->{'bug'} = $bug;
|
||||
$vars->{'attachments'} = $attachments;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/show-multiple.html.tmpl", $vars)
|
||||
|
@ -428,7 +428,7 @@ sub enter {
|
|||
grep { $_->is_requestable && $_->is_requesteeble } @$flag_types;
|
||||
$vars->{'token'} = issue_session_token('create_attachment:');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/create.html.tmpl", $vars)
|
||||
|
@ -464,7 +464,7 @@ sub insert {
|
|||
if ($old_attach_id) {
|
||||
$vars->{'bugid'} = $bugid;
|
||||
$vars->{'attachid'} = $old_attach_id;
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("attachment/cancel-create-dupe.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -577,7 +577,7 @@ sub insert {
|
|||
|
||||
if (Bugzilla->usage_mode != USAGE_MODE_EMAIL)
|
||||
{
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/created.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -605,7 +605,7 @@ sub edit {
|
|||
$vars->{'attachment'} = $attachment;
|
||||
$vars->{'attachments'} = $bugattachments;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/edit.html.tmpl", $vars)
|
||||
|
@ -653,7 +653,7 @@ sub update {
|
|||
$cgi->param('delta_ts', $attachment->modification_time);
|
||||
$vars->{'attachment'} = $attachment;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
# Warn the user about the mid-air collision and ask them what to do.
|
||||
$template->process("attachment/midair.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -707,7 +707,7 @@ sub update {
|
|||
$vars->{'sent_bugmail'} =
|
||||
Bugzilla::BugMail::Send($bug->id, { 'changer' => $user->login }, $silent);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/updated.html.tmpl", $vars)
|
||||
|
@ -719,7 +719,7 @@ sub delete_attachment {
|
|||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
my $dbh = Bugzilla->dbh;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('admin')
|
||||
|| ThrowUserError('auth_failure', {group => 'admin',
|
||||
|
|
18
buglist.cgi
18
buglist.cgi
|
@ -63,7 +63,7 @@ my $buffer = $cgi->query_string();
|
|||
Bugzilla->login();
|
||||
|
||||
if (length($buffer) == 0) {
|
||||
print $cgi->header(-refresh=> '10; URL=query.cgi');
|
||||
$cgi->send_header(-refresh=> '10; URL=query.cgi');
|
||||
ThrowUserError("buglist_parameters_required");
|
||||
}
|
||||
|
||||
|
@ -334,12 +334,12 @@ sub _close_standby_message {
|
|||
|
||||
# Close the "please wait" page, then open the buglist page
|
||||
if ($serverpush) {
|
||||
print $cgi->multipart_end();
|
||||
print $cgi->multipart_start(-type => $contenttype,
|
||||
$cgi->send_multipart_end();
|
||||
$cgi->send_multipart_start(-type => $contenttype,
|
||||
-content_disposition => $disposition);
|
||||
}
|
||||
else {
|
||||
print $cgi->header(-type => $contenttype,
|
||||
$cgi->send_header(-type => $contenttype,
|
||||
-content_disposition => $disposition);
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ if ($cmdtype eq "dorem") {
|
|||
# Now reset the cached queries
|
||||
$user->flush_queries_cache();
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$vars->{'message'} = "buglist_query_gone";
|
||||
$vars->{'namedcmd'} = $qname;
|
||||
|
@ -577,7 +577,7 @@ elsif (($cmdtype eq "doit") && defined $cgi->param('remtype')) {
|
|||
|
||||
$vars->{'queryname'} = $query_name;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -874,8 +874,8 @@ if ($cgi->param('debug')) {
|
|||
# Time to use server push to display an interim message to the user until
|
||||
# the query completes and we can display the bug list.
|
||||
if ($serverpush) {
|
||||
print $cgi->multipart_init();
|
||||
print $cgi->multipart_start(-type => 'text/html');
|
||||
$cgi->send_multipart_init();
|
||||
$cgi->send_multipart_start(-type => 'text/html');
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("list/server-push.html.tmpl", $vars)
|
||||
|
@ -1232,6 +1232,6 @@ $template->process($format->{'template'}, $vars)
|
|||
# Script Conclusion
|
||||
################################################################################
|
||||
|
||||
print $cgi->multipart_final() if $serverpush;
|
||||
$cgi->send_multipart_final() if $serverpush;
|
||||
|
||||
1;
|
||||
|
|
12
chart.cgi
12
chart.cgi
|
@ -187,7 +187,7 @@ elsif ($action eq "alter") {
|
|||
elsif ($action eq "confirm-delete") {
|
||||
$vars->{'series'} = assertCanEdit($series_id);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("reports/delete-series.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ sub edit {
|
|||
$vars->{'category'} = Bugzilla::Chart::getVisibleSeries();
|
||||
$vars->{'default'} = $series;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("reports/edit-series.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -317,11 +317,11 @@ sub plot {
|
|||
|
||||
# Debugging PNGs is a pain; we need to be able to see the error messages
|
||||
if ($cgi->param('debug')) {
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$vars->{'chart'}->dump();
|
||||
}
|
||||
|
||||
print $cgi->header($format->{'ctype'});
|
||||
$cgi->send_header($format->{'ctype'});
|
||||
disable_utf8() if ($format->{'ctype'} =~ /^image\//);
|
||||
|
||||
$template->process($format->{'template'}, $vars)
|
||||
|
@ -339,7 +339,7 @@ sub wrap {
|
|||
$vars->{'imagebase'} = $cgi->canonicalise_query(
|
||||
"action", "action-wrap", "ctype", "format", "width", "height");
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("reports/chart.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ sub view {
|
|||
$vars->{'chart'} = $chart;
|
||||
$vars->{'category'} = Bugzilla::Chart::getVisibleSeries();
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# If we have having problems with bad data, we can set debug=1 to dump
|
||||
# the data structure.
|
||||
|
|
|
@ -158,7 +158,7 @@ if (defined $cgi->param('rememberedquery')) {
|
|||
if ($ENV{'SERVER_SOFTWARE'} =~ /Microsoft-IIS/
|
||||
|| $ENV{'SERVER_SOFTWARE'} =~ /Sun ONE Web/)
|
||||
{
|
||||
print $cgi->header(-type => "text/html",
|
||||
$cgi->send_header(-type => "text/html",
|
||||
-refresh => "0; URL=$vars->{'redirect_url'}");
|
||||
}
|
||||
else {
|
||||
|
@ -194,6 +194,6 @@ if (defined $cgi->param('query_based_on')) {
|
|||
}
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("list/change-columns.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -151,13 +151,13 @@ sub display_data {
|
|||
}
|
||||
|
||||
if ($found304) {
|
||||
print $cgi->header(-type => 'text/html',
|
||||
$cgi->send_header(-type => 'text/html',
|
||||
-ETag => $found304,
|
||||
-status => '304 Not Modified');
|
||||
}
|
||||
else {
|
||||
# Return HTTP headers.
|
||||
print $cgi->header (-ETag => $digest,
|
||||
$cgi->send_header (-ETag => $digest,
|
||||
-type => $format->{'ctype'});
|
||||
print $output;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ my $vars = {};
|
|||
|
||||
$vars->{'doc_section'} = 'myaccount.html';
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# If we're using LDAP for login, then we can't create a new account here.
|
||||
unless (Bugzilla->user->authorizer->user_can_create_account) {
|
||||
|
|
|
@ -36,7 +36,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $template = Bugzilla->template;
|
||||
my $vars = {};
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# This script does nothing but displaying mostly static data.
|
||||
Bugzilla->switch_to_shadow_db;
|
||||
|
|
|
@ -41,6 +41,6 @@ Bugzilla->switch_to_shadow_db;
|
|||
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
|
||||
$vars->{'caneditkeywords'} = Bugzilla->user->in_group("editkeywords");
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
Bugzilla->cgi->send_header();
|
||||
$template->process("reports/keywords.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -256,7 +256,7 @@ my %vars = (
|
|||
);
|
||||
|
||||
my $format = $template->get_format("reports/duplicates", $vars{'format'});
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process($format->{'template'}, \%vars)
|
||||
|
|
|
@ -48,7 +48,7 @@ sub LoadTemplate {
|
|||
|
||||
$action =~ /(\w+)/;
|
||||
$action = $1;
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/classifications/$action.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -60,7 +60,7 @@ sub LoadTemplate {
|
|||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
Bugzilla->user->in_group('editclassifications')
|
||||
|| ThrowUserError("auth_failure", {group => "editclassifications",
|
||||
|
|
|
@ -47,7 +47,7 @@ $vars->{'doc_section'} = 'components.html';
|
|||
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('editcomponents')
|
||||
|| scalar(@{$user->get_editable_products})
|
||||
|
|
|
@ -102,7 +102,7 @@ if (!$vars->{mode_add})
|
|||
) || [];
|
||||
}
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/editemailin.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ $user->in_group('editfields')
|
|||
my $action = trim($cgi->param('action') || '');
|
||||
my $token = $cgi->param('token');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# List all existing custom fields if no action is given.
|
||||
if (!$action) {
|
||||
|
|
|
@ -159,7 +159,7 @@ sub list {
|
|||
$vars->{'attachment_types'} = $attach_flagtypes;
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("admin/flag-type/list.html.tmpl", $vars)
|
||||
|
@ -205,7 +205,7 @@ sub edit {
|
|||
my @groups = Bugzilla::Group->get_all;
|
||||
$vars->{'groups'} = \@groups;
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("admin/flag-type/edit.html.tmpl", $vars)
|
||||
|
@ -268,7 +268,7 @@ sub processCategoryChange {
|
|||
$vars->{'token'} = $token;
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("admin/flag-type/edit.html.tmpl", $vars)
|
||||
|
@ -349,7 +349,7 @@ sub insert {
|
|||
$vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'});
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("admin/flag-type/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -438,7 +438,7 @@ sub update {
|
|||
$vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'});
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("admin/flag-type/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -451,7 +451,7 @@ sub confirmDelete {
|
|||
$vars->{'flag_type'} = $flag_type;
|
||||
$vars->{'token'} = issue_session_token('delete_flagtype');
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("admin/flag-type/confirm-delete.html.tmpl", $vars)
|
||||
|
@ -485,7 +485,7 @@ sub deleteType {
|
|||
$vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'});
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("admin/flag-type/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -512,7 +512,7 @@ sub deactivate {
|
|||
$vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'});
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("admin/flag-type/list.html.tmpl", $vars)
|
||||
|
|
|
@ -48,7 +48,7 @@ my $vars = {};
|
|||
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('creategroups')
|
||||
|| ThrowUserError("auth_failure", {group => "creategroups",
|
||||
|
@ -155,7 +155,7 @@ unless ($action) {
|
|||
my @groups = Bugzilla::Group->get_all;
|
||||
$vars->{'groups'} = \@groups;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -176,7 +176,7 @@ if ($action eq 'changeform') {
|
|||
$vars->{'group'} = $group;
|
||||
$vars->{'token'} = issue_session_token('edit_group');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/edit.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
@ -191,7 +191,7 @@ if ($action eq 'changeform') {
|
|||
|
||||
if ($action eq 'add') {
|
||||
$vars->{'token'} = issue_session_token('add_group');
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/create.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
@ -232,7 +232,7 @@ if ($action eq 'new') {
|
|||
get_current_and_available($group, $vars);
|
||||
$vars->{'token'} = issue_session_token('edit_group');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/edit.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -256,7 +256,7 @@ if ($action eq 'del') {
|
|||
$vars->{'group'} = $group;
|
||||
$vars->{'token'} = issue_session_token('delete_group');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/delete.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
@ -285,7 +285,7 @@ if ($action eq 'delete') {
|
|||
$vars->{'message'} = 'group_deleted';
|
||||
$vars->{'groups'} = [Bugzilla::Group->get_all];
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -310,7 +310,7 @@ if ($action eq 'postchanges') {
|
|||
$vars->{'changes'} = $changes;
|
||||
$vars->{'token'} = issue_session_token('edit_group');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/edit.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -362,7 +362,7 @@ if ($action eq 'remove_regexp') {
|
|||
$vars->{'group'} = $group->name;
|
||||
$vars->{'groups'} = [Bugzilla::Group->get_all];
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ my $vars = {};
|
|||
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('editkeywords')
|
||||
|| ThrowUserError("auth_failure", {group => "editkeywords",
|
||||
|
@ -58,7 +58,7 @@ $vars->{'action'} = $action;
|
|||
if ($action eq "") {
|
||||
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/keywords/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
@ -69,7 +69,7 @@ if ($action eq "") {
|
|||
if ($action eq 'add') {
|
||||
$vars->{'token'} = issue_session_token('add_keyword');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("admin/keywords/create.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -90,7 +90,7 @@ if ($action eq 'new') {
|
|||
|
||||
delete_token($token);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$vars->{'message'} = 'keyword_created';
|
||||
$vars->{'name'} = $keyword->name;
|
||||
|
@ -115,7 +115,7 @@ if ($action eq 'edit') {
|
|||
$vars->{'keyword'} = $keyword;
|
||||
$vars->{'token'} = issue_session_token('edit_keyword');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/keywords/edit.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -139,7 +139,7 @@ if ($action eq 'update') {
|
|||
|
||||
delete_token($token);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$vars->{'message'} = 'keyword_updated';
|
||||
$vars->{'keyword'} = $keyword;
|
||||
|
@ -158,7 +158,7 @@ if ($action eq 'del') {
|
|||
$vars->{'keyword'} = $keyword;
|
||||
$vars->{'token'} = issue_session_token('delete_keyword');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/keywords/confirm-delete.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -173,7 +173,7 @@ if ($action eq 'delete') {
|
|||
|
||||
delete_token($token);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$vars->{'message'} = 'keyword_deleted';
|
||||
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
|
||||
|
|
|
@ -43,7 +43,7 @@ $vars->{'doc_section'} = 'milestones.html';
|
|||
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('editcomponents')
|
||||
|| scalar(@{$user->get_editable_products})
|
||||
|
|
|
@ -42,7 +42,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $template = Bugzilla->template;
|
||||
my $vars = {};
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('tweakparams')
|
||||
|| ThrowUserError("auth_failure", {group => "tweakparams",
|
||||
|
|
|
@ -55,7 +55,7 @@ my $vars = {};
|
|||
# improved and each action has its own section.
|
||||
$vars->{'doc_section'} = 'products.html';
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('editcomponents')
|
||||
|| scalar(@{$user->get_editable_products})
|
||||
|
|
|
@ -31,7 +31,7 @@ my $user = Bugzilla->login(LOGIN_REQUIRED);
|
|||
my $cgi = Bugzilla->cgi;
|
||||
my $vars = {};
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
$user->in_group('tweakparams')
|
||||
|| ThrowUserError("auth_failure", {group => "tweakparams",
|
||||
|
|
|
@ -53,7 +53,7 @@ $editusers
|
|||
action => "edit",
|
||||
object => "users"});
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Common CGI params
|
||||
my $action = $cgi->param('action') || 'search';
|
||||
|
|
|
@ -112,7 +112,7 @@ $vars->{isbuggroup} = $isbuggroup;
|
|||
$vars->{users} = get_users_from_group($group_id);
|
||||
$vars->{user} = $user;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("admin/groups/usersingroup.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
$template->process("global/footer.html.tmpl", $vars)
|
||||
|
|
|
@ -58,7 +58,7 @@ my $vars = {};
|
|||
# the documentation about legal values becomes bigger.
|
||||
$vars->{'doc_section'} = 'edit-values.html';
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
Bugzilla->user->in_group('editfields') ||
|
||||
ThrowUserError('auth_failure', {group => "admin",
|
||||
|
|
|
@ -47,7 +47,7 @@ $vars->{'doc_section'} = 'versions.html';
|
|||
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('editcomponents')
|
||||
|| scalar(@{$user->get_editable_products})
|
||||
|
|
|
@ -328,7 +328,7 @@ if ($cgi->param('update')) {
|
|||
$vars->{'mail_others'} = $can_mail_others;
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Get events again, to cover any updates that were made
|
||||
$events = get_events($userid);
|
||||
|
|
|
@ -33,7 +33,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $dbh = Bugzilla->dbh;
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$user->in_group('admin')
|
||||
|| ThrowUserError('auth_failure', {group => 'admin',
|
||||
|
|
|
@ -113,7 +113,7 @@ if ($product_name eq '') {
|
|||
$vars->{'cloned_bug_id'} = $cgi->param('cloned_bug_id');
|
||||
$vars->{'cloned_comment'} = $cgi->param('cloned_comment');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("global/choose-classification.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -146,7 +146,7 @@ if ($product_name eq '') {
|
|||
$vars->{'cloned_bug_id'} = $cgi->param('cloned_bug_id');
|
||||
$vars->{'cloned_comment'} = $cgi->param('cloned_comment');
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("global/choose-product.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -656,7 +656,7 @@ my $format = $template->get_format("bug/create/create",
|
|||
scalar $cgi->param('format'),
|
||||
scalar $cgi->param('ctype'));
|
||||
|
||||
print $cgi->header($format->{'ctype'});
|
||||
$cgi->send_header($format->{'ctype'});
|
||||
$template->process($format->{'template'}, $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ if (@idlist || @lines)
|
|||
exit;
|
||||
}
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
my ($query, $query_id) = Bugzilla::Search::LookupNamedQuery('MyWorktimeBugs', undef, undef, 0);
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ unless ($args->{commit})
|
|||
$vars->{data} = $table->{data};
|
||||
}
|
||||
}
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("bug/import/importxls.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ if ($cgi->param('logout')) {
|
|||
###############################################################################
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
if ($user->in_group('admin')) {
|
||||
# If 'urlbase' is not set, display the Welcome page.
|
||||
|
|
2
page.cgi
2
page.cgi
|
@ -84,7 +84,7 @@ if ($id) {
|
|||
|
||||
$cgi->param('id', $id);
|
||||
|
||||
print $cgi->header($format->{'ctype'});
|
||||
$cgi->send_header($format->{'ctype'});
|
||||
|
||||
$template->process("$format->{'template'}", \%vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -78,7 +78,6 @@ if ($token) {
|
|||
$vars->{'bugid'} = $old_bug_id;
|
||||
$vars->{'allow_override'} = defined $cgi->param('ignore_token') ? 0 : 1;
|
||||
|
||||
print $cgi->header();
|
||||
$template->process("bug/create/confirm-create-dupe.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -96,7 +95,6 @@ if (defined $cgi->param('maketemplate')) {
|
|||
$vars->{'url'} = $cgi->canonicalise_query('token');
|
||||
$vars->{'short_desc'} = $cgi->param('short_desc');
|
||||
|
||||
print $cgi->header();
|
||||
$template->process("bug/create/make-template.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -325,7 +323,6 @@ if (Bugzilla->usage_mode != USAGE_MODE_EMAIL)
|
|||
}
|
||||
else
|
||||
{
|
||||
print $cgi->header();
|
||||
$template->process("bug/create/created.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@ my $vars = {};
|
|||
# Used to send email when an update is done.
|
||||
sub send_results {
|
||||
my ($bug_id, $vars) = @_;
|
||||
my $template = Bugzilla->template;
|
||||
my $silent = $vars->{commentsilent} = Bugzilla->cgi->param('commentsilent') ? 1 : 0;
|
||||
$vars->{'sent_bugmail'} =
|
||||
Bugzilla::BugMail::Send($bug_id, $vars->{'mailrecipients'}, $silent);
|
||||
|
@ -146,8 +145,6 @@ Bugzilla::User::match_field({
|
|||
'assigned_to' => { 'type' => 'single' },
|
||||
});
|
||||
|
||||
print $cgi->header() unless Bugzilla->usage_mode == USAGE_MODE_EMAIL;
|
||||
|
||||
# Check for a mid-air collision. Currently this only works when updating
|
||||
# an individual bug.
|
||||
if (defined $cgi->param('delta_ts'))
|
||||
|
|
|
@ -44,7 +44,7 @@ $sel->click_ok("send");
|
|||
$sel->wait_for_page_to_load_ok(WAIT_TIME);
|
||||
$sel->title_is("Too Soon For New Token");
|
||||
my $error_msg = trim($sel->get_text("error_msg"));
|
||||
ok($error_msg =~ /Please wait a while and try again/, "Too soon for this account");
|
||||
_ok($error_msg =~ /Please wait a while and try again/, "Too soon for this account");
|
||||
|
||||
# These accounts do not pass the regexp.
|
||||
my @accounts = ('test@yahoo.com', 'test@bugzilla.net', 'test@bugzilla..test');
|
||||
|
@ -70,7 +70,7 @@ foreach my $account (@accounts) {
|
|||
$sel->wait_for_page_to_load_ok(WAIT_TIME);
|
||||
$sel->title_is("Invalid Email Address");
|
||||
my $error_msg = trim($sel->get_text("error_msg"));
|
||||
ok($error_msg =~ /^The e-mail address you entered (\S+) didn't pass our syntax checking/, "Invalid email address detected");
|
||||
_ok($error_msg =~ /^The e-mail address you entered (\S+) didn't pass our syntax checking/, "Invalid email address detected");
|
||||
}
|
||||
|
||||
# This account already exists.
|
||||
|
@ -82,7 +82,7 @@ $sel->click_ok("send");
|
|||
$sel->wait_for_page_to_load_ok(WAIT_TIME);
|
||||
$sel->title_is("Account Already Exists");
|
||||
$error_msg = trim($sel->get_text("error_msg"));
|
||||
ok($error_msg eq "There is already an account with the login name $config->{admin_user_login}.", "Account already exists");
|
||||
_ok($error_msg eq "There is already an account with the login name $config->{admin_user_login}.", "Account already exists");
|
||||
|
||||
# Turn off user account creation.
|
||||
log_in($sel, $config, 'admin');
|
||||
|
@ -90,15 +90,15 @@ set_parameters($sel, { "User Authentication" => {"createemailregexp" => {type =>
|
|||
logout($sel);
|
||||
|
||||
# Make sure that links pointing to createaccount.cgi are all deactivated.
|
||||
ok(!$sel->is_text_present("New Account"), "No link named 'New Account'");
|
||||
_ok(!$sel->is_text_present("New Account"), "No link named 'New Account'");
|
||||
$sel->click_ok("link=Home");
|
||||
$sel->wait_for_page_to_load_ok(WAIT_TIME);
|
||||
$sel->title_is("Bugzilla Main Page");
|
||||
ok(!$sel->is_text_present("Open a New Account"), "No link named 'Open a New Account'");
|
||||
_ok(!$sel->is_text_present("Open a New Account"), "No link named 'Open a New Account'");
|
||||
$sel->open_ok("/$config->{bugzilla_installation}/createaccount.cgi");
|
||||
$sel->title_is("Account Creation Disabled");
|
||||
$error_msg = trim($sel->get_text("error_msg"));
|
||||
ok($error_msg =~ /^User account creation has been disabled. New accounts must be created by an administrator/,
|
||||
_ok($error_msg =~ /^User account creation has been disabled. New accounts must be created by an administrator/,
|
||||
"User account creation disabled");
|
||||
|
||||
# Re-enable user account creation.
|
||||
|
|
|
@ -401,7 +401,7 @@ my $format = $template->get_format("search/search",
|
|||
$vars->{'query_format'} || $vars->{'format'},
|
||||
scalar $cgi->param('ctype'));
|
||||
|
||||
print $cgi->header($format->{'ctype'});
|
||||
$cgi->send_header($format->{'ctype'});
|
||||
|
||||
$template->process($format->{'template'}, $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -141,6 +141,6 @@ if ($action eq "delete") {
|
|||
$dbh->do("DELETE FROM quips WHERE quipid = ?", undef, $quipid);
|
||||
}
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("list/quips.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -196,6 +196,6 @@ else {
|
|||
}
|
||||
|
||||
# Display the template
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process($target, $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -55,7 +55,7 @@ my $action = $cgi->param('action') || 'menu';
|
|||
|
||||
if ($action eq "menu") {
|
||||
# No need to do any searching in this case, so bail out early.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("reports/menu.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -318,7 +318,7 @@ $format->{'ctype'} = "text/html" if $cgi->param('debug');
|
|||
my @time = localtime(time());
|
||||
my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3];
|
||||
my $filename = "report-$date.$format->{extension}";
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "inline; filename=$filename");
|
||||
|
||||
# Problems with this CGI are often due to malformed data. Setting debug=1
|
||||
|
|
|
@ -90,7 +90,7 @@ if (! defined $cgi->param('product')) {
|
|||
$vars->{'datasets'} = \@datasets;
|
||||
$vars->{'products'} = \@myproducts;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process('reports/old-charts.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -125,7 +125,7 @@ else {
|
|||
|
||||
$vars->{'url_image'} = $url_image;
|
||||
|
||||
print $cgi->header(-Content_Disposition=>'inline; filename=bugzilla_report.html');
|
||||
$cgi->send_header(-Content_Disposition=>'inline; filename=bugzilla_report.html');
|
||||
|
||||
$template->process('reports/old-charts.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -47,7 +47,7 @@ Bugzilla->switch_to_shadow_db;
|
|||
my $template = Bugzilla->template;
|
||||
my $action = $cgi->param('action') || '';
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
################################################################################
|
||||
# Main Body Execution
|
||||
|
|
|
@ -192,7 +192,7 @@ foreach $k (@$gkeys)
|
|||
# Output feed title
|
||||
$vars->{title} = $title;
|
||||
|
||||
print $cgi->header(-type => 'text/xml');
|
||||
$cgi->send_header(-type => 'text/xml');
|
||||
$template->process('list/comments.'.$format.'.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ else {
|
|||
}
|
||||
my $vars = {};
|
||||
|
||||
print $cgi->header() unless Bugzilla->usage_mode == USAGE_MODE_CMDLINE;
|
||||
$cgi->send_header() unless Bugzilla->usage_mode == USAGE_MODE_CMDLINE;
|
||||
|
||||
# Make sure the user is authorized to access sanitycheck.cgi.
|
||||
# As this script can now alter the group_control_map table, we no longer
|
||||
|
|
|
@ -29,7 +29,7 @@ my $template = Bugzilla->template;
|
|||
my $vars = {};
|
||||
|
||||
# Return the appropriate HTTP response headers.
|
||||
print $cgi->header('application/xml');
|
||||
$cgi->send_header('application/xml');
|
||||
|
||||
# Get the contents of favicon.ico
|
||||
my $filename = bz_locations()->{'libpath'} . "/images/favicon.ico";
|
||||
|
|
|
@ -40,6 +40,6 @@ foreach my $user (@{$vars->{users}})
|
|||
$user->{list} = join ', ', map { $_->{login_name} } @$users_in_group;
|
||||
}
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process('list-of-mail-groups.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -59,7 +59,7 @@ Bugzilla->switch_to_shadow_db;
|
|||
|
||||
$vars->{'bug'} = $bug;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("bug/activity/show.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -43,7 +43,7 @@ my $single = !$cgi->param('format')
|
|||
|
||||
# If we don't have an ID, _AND_ we're only doing a single bug, then prompt
|
||||
if (!$cgi->param('id') && $single) {
|
||||
print Bugzilla->cgi->header();
|
||||
Bugzilla->cgi->send_header();
|
||||
$template->process("bug/choose.html.tmpl", $vars) ||
|
||||
ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -132,7 +132,7 @@ if (Bugzilla->session && ($sd = Bugzilla->session_data) && $sd->{sent})
|
|||
$vars->{sentmail} = $sd->{sent};
|
||||
}
|
||||
|
||||
print $cgi->header($format->{'ctype'});
|
||||
$cgi->send_header($format->{'ctype'});
|
||||
|
||||
$template->process("$format->{'template'}", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -72,7 +72,7 @@ $vars->{display} = $display;
|
|||
$vars->{graphs} = $graphs;
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("bug/dependency-graph.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ $vars->{'bugid'} = $id;
|
|||
$vars->{'maxdepth'} = $maxdepth;
|
||||
$vars->{'hide_resolved'} = $hide_resolved;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("bug/dependency-tree.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ my $template = Bugzilla->template;
|
|||
|
||||
my $useragent = $ENV{HTTP_USER_AGENT};
|
||||
if ($useragent =~ m:Mozilla/([1-9][0-9]*):i && $1 >= 5 && $useragent !~ m/compatible/i) {
|
||||
print $cgi->header("application/vnd.mozilla.xul+xml");
|
||||
$cgi->send_header("application/vnd.mozilla.xul+xml");
|
||||
# Generate and return the XUL from the appropriate template.
|
||||
$template->process("sidebar.xul.tmpl")
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -429,6 +429,6 @@ $vars->{my_activity} = $my_activity;
|
|||
my $format = $template->get_format("bug/summarize-time", undef, $ctype);
|
||||
|
||||
# Get the proper content-type
|
||||
print $cgi->header(-type=> $format->{'ctype'});
|
||||
$cgi->send_header(-type=> $format->{'ctype'});
|
||||
$template->process("$format->{'template'}", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -88,7 +88,7 @@ var flags = new Array([% product.components.size %]);
|
|||
|
||||
function Create_onsubmit()
|
||||
{
|
||||
wt = bzParseTime(document.Create.work_time.value);
|
||||
var wt = bzParseTime(document.Create.work_time.value);
|
||||
if (wt !== null && (wt === undefined || wt != wt))
|
||||
wt = null;
|
||||
else if (wt < 0)
|
||||
|
|
20
token.cgi
20
token.cgi
|
@ -181,7 +181,7 @@ sub requestChangePassword {
|
|||
|
||||
$vars->{'message'} = "password_change_request";
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ sub confirmChangePassword {
|
|||
my $token = shift;
|
||||
$vars->{'token'} = $token;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("account/password/set-forgotten-password.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ sub cancelChangePassword {
|
|||
$vars->{'message'} = "password_change_canceled";
|
||||
Bugzilla::Token::Cancel($token, $vars->{'message'});
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ sub changePassword {
|
|||
|
||||
$vars->{'message'} = "password_changed";
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ sub confirmChangeEmail {
|
|||
my $token = shift;
|
||||
$vars->{'token'} = $token;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("account/email/confirm.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ sub changeEmail {
|
|||
$dbh->bz_commit_transaction();
|
||||
|
||||
# Return HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
# Let the user know their email address has been changed.
|
||||
|
||||
|
@ -346,7 +346,7 @@ sub cancelChangeEmail {
|
|||
$dbh->bz_commit_transaction();
|
||||
|
||||
# Return HTTP response headers.
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -360,7 +360,7 @@ sub request_create_account {
|
|||
$vars->{'email'} = $login_name . Bugzilla->params->{'emailsuffix'};
|
||||
$vars->{'expiration_ts'} = ctime(str2time($date) + MAX_TOKEN_AGE * 86400);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process('account/email/confirm-new.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ sub confirm_create_account {
|
|||
delete Bugzilla->request_cache->{sub_login_to_id}->{$otheruser->login};
|
||||
Bugzilla->login(LOGIN_OPTIONAL);
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
|
||||
$template->process('index.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -409,7 +409,7 @@ sub cancel_create_account {
|
|||
$vars->{'account'} = $login_name;
|
||||
Bugzilla::Token::Cancel($token, $vars->{'message'});
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process('global/message.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ use vars qw($vars);
|
|||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => {'type' => 'Testopia administration'}}) unless Bugzilla->user->in_group('admin');
|
||||
|
||||
local our $plan = Testopia::TestPlan->new({});
|
||||
|
|
|
@ -46,7 +46,7 @@ my $attach_id = $cgi->param('attach_id');
|
|||
|
||||
detaint_natural($attach_id) if $attach_id;
|
||||
if (!$attach_id and $cgi->param('ctype') ne 'json'){
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("testopia/attachment/choose.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -56,7 +56,7 @@ if (!$attach_id and $cgi->param('ctype') ne 'json'){
|
|||
### Edit ###
|
||||
##################
|
||||
if ($action eq 'edit') {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
validate_test_id($attach_id,'attachment');
|
||||
my $attachment = Testopia::Attachment->new($attach_id);
|
||||
|
||||
|
@ -75,7 +75,7 @@ if ($action eq 'edit') {
|
|||
####################
|
||||
|
||||
elsif ($action eq 'remove') {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $item = $cgi->param('object');
|
||||
my $item_id = $cgi->param('object_id');
|
||||
my $obj;
|
||||
|
@ -111,7 +111,7 @@ elsif ($action eq 'remove') {
|
|||
}
|
||||
|
||||
elsif ($action eq 'add'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $item = $cgi->param('object');
|
||||
my $item_id = $cgi->param('object_id');
|
||||
|
@ -160,7 +160,7 @@ elsif ($action eq 'add'){
|
|||
################
|
||||
elsif ($action eq 'list') {
|
||||
my $format = $template->get_format("testopia/attachment/list", scalar $cgi->param('format'), scalar $cgi->param('ctype'));
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $item = $cgi->param('object');
|
||||
my $item_id = $cgi->param('object_id');
|
||||
|
@ -207,7 +207,7 @@ else {
|
|||
$filename =~ s/\\/\\\\/g; # escape backslashes
|
||||
$filename =~ s/"/\\"/g; # escape quotes
|
||||
|
||||
print $cgi->header(-type => $attachment->mime_type . "; name=\"$filename\"",
|
||||
$cgi->send_header(-type => $attachment->mime_type . "; name=\"$filename\"",
|
||||
-content_disposition => "inline; filename=\"$filename\"",
|
||||
-content_length => $attachment->datasize);
|
||||
disable_utf8();
|
||||
|
|
|
@ -45,7 +45,7 @@ my $product_id = $cgi->param('product_id');
|
|||
|
||||
print "Location: tr_show_product.cgi?tab=build\n\n" unless $action;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
ThrowUserError("testopia-missing-parameter", {param => "product_id"}) unless $product_id;
|
||||
|
||||
|
@ -111,7 +111,7 @@ elsif ($action eq 'report'){
|
|||
my $vars = {};
|
||||
my $template = Bugzilla->template;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my @build_ids = $cgi->param('build_ids');
|
||||
my @builds;
|
||||
|
|
|
@ -72,7 +72,7 @@ if ($type eq 'status-breakdown'){
|
|||
$vars->{'data'} = \@data;
|
||||
$vars->{'chart_title'} = 'Historic Status Breakdown';
|
||||
$vars->{'colors'} = (['#858aef', '#56e871', '#ed3f58', '#b8eae1', '#f1d9ab', '#e17a56']);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/report-pie.png.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ else{
|
|||
$disp = "attachment";
|
||||
}
|
||||
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'time'} = $date;
|
||||
|
|
|
@ -60,12 +60,12 @@ elsif ($cgi->param('run_id')){
|
|||
$cgi->param('env_id'));
|
||||
}
|
||||
else{
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError('testopia-missing-parameter', {'param' => 'caserun_id or case_id and run_id'});
|
||||
}
|
||||
|
||||
if ($action eq 'update_build'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
my $build_id = $cgi->param('build_id');
|
||||
detaint_natural($build_id);
|
||||
|
@ -77,7 +77,7 @@ if ($action eq 'update_build'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_environment'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
my $environment_id = $cgi->param('caserun_env');
|
||||
detaint_natural($environment_id);
|
||||
|
@ -89,7 +89,7 @@ elsif ($action eq 'update_environment'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_status'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
my $status_id = $cgi->param('status_id');
|
||||
|
||||
|
@ -101,7 +101,7 @@ elsif ($action eq 'update_status'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_note'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
my $note = $cgi->param('note');
|
||||
|
||||
|
@ -112,7 +112,7 @@ elsif ($action eq 'update_note'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_assignee'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
my $assignee_id;
|
||||
if ($cgi->param('assignee')){
|
||||
|
@ -125,7 +125,7 @@ elsif ($action eq 'update_assignee'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_sortkey'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
|
||||
my $sortkey = $cgi->param('sortkey');
|
||||
|
@ -137,7 +137,7 @@ elsif ($action eq 'update_sortkey'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_priority'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
|
||||
$caserun->set_priority($cgi->param('priority'));
|
||||
|
@ -148,7 +148,7 @@ elsif ($action eq 'update_priority'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'update_category'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
|
||||
$caserun->case->set_category($cgi->param('category'));
|
||||
|
@ -159,7 +159,7 @@ elsif ($action eq 'update_category'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'getbugs'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
my $bugs;
|
||||
foreach my $bug (@{$caserun->bugs}){
|
||||
|
@ -173,7 +173,7 @@ elsif ($action eq 'getbugs'){
|
|||
|
||||
elsif ($action eq 'gettext'){
|
||||
unless ($caserun->canview){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-permission-denied", {'object' => $caserun});
|
||||
}
|
||||
|
||||
|
@ -186,13 +186,13 @@ elsif ($action eq 'gettext'){
|
|||
|
||||
$vars->{'text'} = $text;
|
||||
|
||||
print $cgi->header(-type => 'text/xml');
|
||||
$cgi->send_header(-type => 'text/xml');
|
||||
Bugzilla->template->process("testopia/case/text.xml.tmpl", $vars) ||
|
||||
ThrowTemplateError(Bugzilla->template->error());
|
||||
}
|
||||
|
||||
elsif ($action eq 'gethistory'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-permission-denied", {'object' => $caserun}) unless $caserun->canview;
|
||||
|
||||
print '{"records":';
|
||||
|
|
|
@ -90,7 +90,7 @@ else{
|
|||
$disp = "attachment";
|
||||
}
|
||||
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'time'} = $date;
|
||||
|
|
|
@ -42,7 +42,7 @@ my $product_id = $cgi->param('product_id');
|
|||
|
||||
print "Location: tr_show_product.cgi?tab=category\n\n" unless $action;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
ThrowUserError("testopia-missing-parameter", {param => "product_id"}) unless $product_id;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ my $vars = {};
|
|||
|
||||
my $template = Bugzilla->template;
|
||||
my $cgi = Bugzilla->cgi;
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
$vars->{'txt'} = $cgi->param('text');
|
||||
$template->process("testopia/text.png.tmpl", $vars)
|
||||
|
|
|
@ -54,7 +54,7 @@ our $cgi = Bugzilla->cgi;
|
|||
local our $vars = {};
|
||||
local our $template = Bugzilla->template;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
local our $env_id = trim( Bugzilla->cgi->param('env_id') ) || '';
|
||||
|
|
|
@ -57,7 +57,7 @@ my $template = Bugzilla->template;
|
|||
my $env_id = $cgi->param('env_id');
|
||||
|
||||
#********************************************* UI Logic ************************************************#
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $env = Testopia::Environment->new($env_id);
|
||||
ThrowUserError("testopia-read-only", {'object' => $env}) unless $env->canview;
|
||||
my $xml = Testopia::Environment::Xml->export($env_id);
|
||||
|
|
|
@ -25,7 +25,7 @@ my $action = $cgi->param("action");
|
|||
|
||||
print "Location: tr_show_product.cgi\n\n" unless $action;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $obj;
|
||||
if ($cgi->param('object') eq 'plan'){
|
||||
|
@ -49,7 +49,7 @@ if ($action eq 'diff')
|
|||
{
|
||||
if ($type eq 'plan')
|
||||
{
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $plan = Testopia::TestPlan->new($id);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ our $message = '';
|
|||
$CGI::POST_MAX = 1024 * 500; # max file size 500K
|
||||
|
||||
#***************************************** UI Logic ************************************************************#
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
# Make sure the file isn't too big.
|
||||
if (!$env_filename && $cgi->cgi_error()) {
|
||||
$vars->{'tr_error'} .= "File size cannot exceed 500K.<BR/>";
|
||||
|
|
|
@ -51,7 +51,7 @@ my $dbh = Bugzilla->dbh;
|
|||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
my $ctype = $cgi->param('ctype') || '';
|
||||
|
|
|
@ -50,7 +50,7 @@ $::SIG{PIPE} = 'DEFAULT';
|
|||
my $action = $cgi->param('action') || '';
|
||||
|
||||
if ($action eq 'update'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
my @caseruns;
|
||||
my @uneditable;
|
||||
|
@ -109,7 +109,7 @@ if ($action eq 'update'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'delete'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
my @case_ids;
|
||||
if ($cgi->param('ids')){
|
||||
|
@ -187,7 +187,7 @@ else {
|
|||
my @time = localtime(time());
|
||||
my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3];
|
||||
my $filename = "testresults-$date.$format->{extension}";
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'json'} = $table->to_ext_json;
|
||||
|
|
|
@ -61,7 +61,7 @@ $::SIG{PIPE} = 'DEFAULT';
|
|||
###############
|
||||
if ($action eq 'update'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @case_ids = split(',', $cgi->param('ids'));
|
||||
ThrowUserError('testopia-none-selected', {'object' => 'case'}) unless (scalar @case_ids);
|
||||
|
||||
|
@ -131,7 +131,7 @@ if ($action eq 'update'){
|
|||
|
||||
elsif ($action eq 'clone'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my @case_ids = split(',', $cgi->param('ids'));
|
||||
ThrowUserError('testopia-none-selected', {'object' => 'case'}) unless (scalar @case_ids);
|
||||
|
@ -234,7 +234,7 @@ elsif ($action eq 'clone'){
|
|||
|
||||
elsif ($action eq 'delete'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my @case_ids = split(",", $cgi->param('case_ids'));
|
||||
my @uneditable;
|
||||
|
@ -254,7 +254,7 @@ elsif ($action eq 'delete'){
|
|||
|
||||
elsif ($action eq 'unlink'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $plan_id = $cgi->param('plan_id');
|
||||
validate_test_id($plan_id, 'plan');
|
||||
foreach my $id (split(",", $cgi->param('case_ids'))){
|
||||
|
@ -273,7 +273,7 @@ elsif ($action eq 'unlink'){
|
|||
|
||||
elsif ($action eq 'update_bugs'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my @ids = split(",", $cgi->param('ids'));
|
||||
my @objs;
|
||||
|
@ -311,7 +311,7 @@ else{
|
|||
$vars->{'table'} = $table;
|
||||
if ($cgi->param('ctype') eq 'json'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$vars->{'json'} = $table->to_ext_json;
|
||||
$template->process($format->{'template'}, $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -331,7 +331,7 @@ else{
|
|||
}
|
||||
|
||||
# Suggest a name for the bug list if the user wants to save it as a file.
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$template->process($format->{'template'}, $vars)
|
||||
|
|
|
@ -55,7 +55,7 @@ my $search = Testopia::Search->new($cgi);
|
|||
my $table = Testopia::Table->new('environment', 'tr_list_environments.cgi', $cgi, undef, $search->query);
|
||||
|
||||
if ($cgi->param('ctype') eq 'json'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$vars->{'json'} = $table->to_ext_json;
|
||||
$template->process($format->{'template'}, $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
|
|
@ -49,7 +49,7 @@ my $action = $cgi->param('action') || '';
|
|||
|
||||
if ($action eq 'update'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @plan_ids = split(',', $cgi->param('ids'));
|
||||
|
||||
ThrowUserError('testopia-none-selected', {'object' => 'plan'}) unless (scalar @plan_ids);
|
||||
|
@ -95,7 +95,7 @@ else {
|
|||
my @time = localtime(time());
|
||||
my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3];
|
||||
my $filename = "testplans-$date.$format->{extension}";
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'json'} = $table->to_ext_json;
|
||||
|
|
|
@ -54,7 +54,7 @@ $::SIG{PIPE} = 'DEFAULT';
|
|||
my $action = $cgi->param('action') || '';
|
||||
if ($action eq 'update'){
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my @run_ids = split(',', $cgi->param('ids'));
|
||||
ThrowUserError('testopia-none-selected', {'object' => 'run'}) unless (scalar @run_ids);
|
||||
|
@ -84,7 +84,7 @@ if ($action eq 'update'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'clone'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
|
||||
my @run_ids = split(',', $cgi->param('ids'));
|
||||
|
@ -173,7 +173,7 @@ elsif ($action eq 'clone'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'delete'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
my @run_ids = split(",", $cgi->param('run_ids'));
|
||||
my @uneditable;
|
||||
|
@ -192,7 +192,7 @@ elsif ($action eq 'delete'){
|
|||
}
|
||||
|
||||
else {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$vars->{'qname'} = $cgi->param('qname') if $cgi->param('qname');
|
||||
$cgi->param('current_tab', 'run');
|
||||
$cgi->param('distinct', '1');
|
||||
|
|
|
@ -57,7 +57,7 @@ Bugzilla->login(LOGIN_REQUIRED);
|
|||
my $cgi = Bugzilla->cgi;
|
||||
my $template = Bugzilla->template;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
my @plan_id = split(',', $cgi->param('plan_id'));
|
||||
|
|
|
@ -44,7 +44,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $vars = {};
|
||||
my $template = Bugzilla->template;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
ThrowUserError("testopia-create-denied", {'object' => 'Test Environment'}) unless Bugzilla->user->in_group('Testers');
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ my $template = Bugzilla->template;
|
|||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ my $template = Bugzilla->template;
|
|||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
my $cgi = Bugzilla->cgi;
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
my $plan_id = $cgi->param('plan_id');
|
||||
|
|
|
@ -41,7 +41,7 @@ local our $cgi = Bugzilla->cgi;
|
|||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
Bugzilla->error_mode(ERROR_MODE_AJAX);
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $plan_id = trim($cgi->param('plan_id') || '');
|
||||
my $action = $cgi->param('action') || '';
|
||||
|
|
|
@ -45,7 +45,7 @@ if ($type eq 'build_coverage'){
|
|||
unless ($plan_id){
|
||||
$vars->{'form_action'} = 'tr_plan_reports.cgi';
|
||||
$vars->{'type'} = 'build_coverage';
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/plan/choose.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -79,7 +79,7 @@ if ($type eq 'build_coverage'){
|
|||
$vars->{'report'} = $report;
|
||||
$vars->{'plan'} = $plan;
|
||||
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
if ($cgi->param('debug')){
|
||||
use Data::Dumper;
|
||||
print Dumper($report);
|
||||
|
@ -95,7 +95,7 @@ elsif ($type eq 'bugcounts'){
|
|||
unless ($plan_id){
|
||||
$vars->{'form_action'} = 'tr_plan_reports.cgi';
|
||||
$vars->{'type'} = 'bugcounts';
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/plan/choose.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -117,7 +117,7 @@ elsif ($type eq 'bugcounts'){
|
|||
$vars->{'bug_table'} = $ref;
|
||||
$vars->{'plan'} = $plan;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/bug-count.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ elsif ($type eq 'untested'){
|
|||
unless ($plan_id){
|
||||
$vars->{'form_action'} = 'tr_plan_reports.cgi';
|
||||
$vars->{'type'} = 'bugcounts';
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/plan/choose.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -151,7 +151,7 @@ elsif ($type eq 'untested'){
|
|||
$vars->{'case_count'} = scalar @$ref;
|
||||
$vars->{'plan_id'} = $plan_id;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/untested.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ else{
|
|||
$disp = "attachment";
|
||||
}
|
||||
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'time'} = $date;
|
||||
|
|
|
@ -48,12 +48,12 @@ my $action = $cgi->param('action') || '';
|
|||
my $case = Testopia::TestCase->new($cgi->param('case_id'));
|
||||
|
||||
unless ($case){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError('testopia-missing-object',{object => 'case'});
|
||||
}
|
||||
|
||||
if ($action eq 'edit'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $case}) unless $case->canedit;
|
||||
|
||||
$case->set_alias($cgi->param('alias')) if exists $cgi->{param}->{'alias'} || exists $cgi->{'alias'};
|
||||
|
@ -82,7 +82,7 @@ if ($action eq 'edit'){
|
|||
|
||||
elsif ($action eq 'update_doc'){
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $case}) unless $case->canedit;
|
||||
|
||||
my $newtcaction = $cgi->param('tcaction') || '' if $cgi->param('tcaction');
|
||||
|
@ -96,7 +96,7 @@ elsif ($action eq 'update_doc'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'link') {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @plans;
|
||||
foreach my $id (split(',', $cgi->param('plan_ids'))){
|
||||
my $plan = Testopia::TestPlan->new($id);
|
||||
|
@ -115,7 +115,7 @@ elsif ($action eq 'link') {
|
|||
}
|
||||
|
||||
elsif ($action eq 'unlink'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $plan_id = $cgi->param('plan_id');
|
||||
validate_test_id($plan_id, 'plan');
|
||||
ThrowUserError("testopia-read-only", {'object' => 'case'}) unless ($case->can_unlink_plan($plan_id));
|
||||
|
@ -125,7 +125,7 @@ elsif ($action eq 'unlink'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'detachbug'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $case}) unless $case->canedit;
|
||||
my @buglist;
|
||||
foreach my $bug (split(/[\s,]+/, $cgi->param('bug_id'))){
|
||||
|
@ -139,7 +139,7 @@ elsif ($action eq 'detachbug'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'delete'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-no-delete", {'object' => $case}) unless $case->candelete;
|
||||
|
||||
$case->obliterate;
|
||||
|
@ -147,7 +147,7 @@ elsif ($action eq 'delete'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'addcomponent' || $action eq 'removecomponent'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $case}) unless $case->canedit;
|
||||
my $comp = $cgi->param('component_id');
|
||||
|
||||
|
@ -166,7 +166,7 @@ elsif ($action eq 'addcomponent' || $action eq 'removecomponent'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'getbugs'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-permission-denied", {'object' => $case}) unless $case->canview;
|
||||
my @bugs;
|
||||
foreach my $bug (@{$case->bugs}){
|
||||
|
@ -188,7 +188,7 @@ elsif ($action eq 'getbugs'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'getplans'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-permission-denied", {'object' => $case}) unless $case->canview;
|
||||
my @plans;
|
||||
foreach my $p (@{$case->plans}){
|
||||
|
@ -199,7 +199,7 @@ elsif ($action eq 'getplans'){
|
|||
}
|
||||
|
||||
elsif($action eq 'getcomponents'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-permission-denied", {'object' => $case}) unless $case->canview;
|
||||
my @comps;
|
||||
foreach my $c (@{$case->components}){
|
||||
|
@ -230,12 +230,12 @@ elsif ($action eq 'case_to_bug'){
|
|||
$vars->{'caserun'} = Testopia::TestCaseRun->new($cgi->param('caserun_id')) if $cgi->param('caserun_id');
|
||||
$vars->{'case'} = $case;
|
||||
|
||||
print $cgi->header(-type => 'text/xml');
|
||||
$cgi->send_header(-type => 'text/xml');
|
||||
Bugzilla->template->process("testopia/case/new-bug.xml.tmpl", $vars) ||
|
||||
ThrowTemplateError(Bugzilla->template->error());
|
||||
}
|
||||
|
||||
else {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-no-action");
|
||||
}
|
||||
|
|
|
@ -46,13 +46,13 @@ my $action = $cgi->param('action') || '';
|
|||
my $plan = Testopia::TestPlan->new($cgi->param('plan_id'));
|
||||
|
||||
unless ($plan){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError('testopia-missing-object',{object => 'plan'});
|
||||
}
|
||||
|
||||
### Archive or Unarchive ###
|
||||
if ($action eq 'archive' || $action eq 'unarchive'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
ThrowUserError("testopia-read-only", {'object' => $plan}) unless $plan->canedit;
|
||||
|
||||
|
@ -64,7 +64,7 @@ if ($action eq 'archive' || $action eq 'unarchive'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'clone'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-create-denied", {object => 'plan'}) unless (Bugzilla->user->in_group('Testers'));
|
||||
|
||||
my $plan_name = $cgi->param('plan_name');
|
||||
|
@ -212,7 +212,7 @@ elsif ($action eq 'clone'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'delete'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-no-delete", {'object' => $plan}) unless ($plan->candelete);
|
||||
|
||||
$plan->obliterate;
|
||||
|
@ -222,7 +222,7 @@ elsif ($action eq 'delete'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'edit'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $plan}) unless $plan->canedit;
|
||||
|
||||
$plan->set_default_product_version($cgi->param('prod_version')) if $cgi->param('prod_version');
|
||||
|
@ -248,13 +248,13 @@ elsif ($action eq 'getfilter'){
|
|||
$vars->{'case'} = Testopia::TestCase->new({});
|
||||
$vars->{'plan'} = $plan;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
Bugzilla->template->process("testopia/case/filter.html.tmpl", $vars) ||
|
||||
ThrowTemplateError(Bugzilla->template->error());
|
||||
}
|
||||
|
||||
else {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-no-action");
|
||||
}
|
|
@ -42,12 +42,12 @@ Bugzilla->error_mode(ERROR_MODE_AJAX);
|
|||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
my $run = Testopia::TestRun->new($cgi->param('run_id'));
|
||||
unless ($run){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError('testopia-missing-object',{object => 'run'});
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ elsif ($action eq 'getfilters'){
|
|||
}
|
||||
|
||||
else {
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
ThrowUserError("testopia-no-action");
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ my $vars = {};
|
|||
my $template = Bugzilla->template;
|
||||
my $cgi = Bugzilla->cgi;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
use Data::Dumper;
|
||||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
@ -120,7 +120,7 @@ if ($action eq 'draw'){
|
|||
$vars->{'data'} = \@data;
|
||||
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/report-pie.png.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
20
tr_query.cgi
20
tr_query.cgi
|
@ -125,7 +125,7 @@ sub get_searchable_objects{
|
|||
my $action = $cgi->param('action') || '';
|
||||
|
||||
if ($action eq 'getversions'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @prod_ids;
|
||||
|
||||
my $type = $cgi->param('type');
|
||||
|
@ -179,7 +179,7 @@ if ($action eq 'getversions'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'get_products'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @prod;
|
||||
if (Bugzilla->params->{'useclassification'}){
|
||||
my @classes = $cgi->param('class_ids');
|
||||
|
@ -201,7 +201,7 @@ elsif ($action eq 'get_products'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'get_categories'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @prod_ids = $cgi->param('prod_id');
|
||||
my $ret;
|
||||
|
||||
|
@ -218,7 +218,7 @@ elsif ($action eq 'get_categories'){
|
|||
print $ret;
|
||||
}
|
||||
elsif ($action eq 'get_elements'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @cat_ids = $cgi->param('cat_id');
|
||||
my $ret;
|
||||
my @elmnts;
|
||||
|
@ -242,7 +242,7 @@ elsif ($action eq 'get_elements'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'get_properties'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @elmnt_ids = $cgi->param('elmnt_id');
|
||||
my $ret;
|
||||
|
||||
|
@ -260,7 +260,7 @@ elsif ($action eq 'get_properties'){
|
|||
print $ret;
|
||||
}
|
||||
elsif ($action eq 'get_valid_exp'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @prop_ids = $cgi->param('prop_id');
|
||||
my $ret;
|
||||
|
||||
|
@ -279,7 +279,7 @@ elsif ($action eq 'get_valid_exp'){
|
|||
print $ret;
|
||||
}
|
||||
elsif ($action eq 'save_query'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $query = $cgi->param('query_part');
|
||||
my $qname = $cgi->param('query_name');
|
||||
my $type = $cgi->param('type');
|
||||
|
@ -320,7 +320,7 @@ elsif ($action eq 'save_query'){
|
|||
print "{'success': true}";
|
||||
}
|
||||
elsif ($action eq 'delete_query'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $qname = $cgi->param('query_name');
|
||||
|
||||
trick_taint($qname);
|
||||
|
@ -333,7 +333,7 @@ elsif ($action eq 'delete_query'){
|
|||
}
|
||||
|
||||
elsif ($action eq 'get_saved_searches'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $type = $cgi->param('type');
|
||||
my $user = $cgi->param('userid') || Bugzilla->user->id;
|
||||
detaint_natural($type);
|
||||
|
@ -411,7 +411,7 @@ else{
|
|||
print "Location: tr_show_product.cgi?search=1 \n\n";
|
||||
exit;
|
||||
}
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$vars->{'report'} = $cgi->param('report');
|
||||
$vars->{'current_tab'} = $tab;
|
||||
$template->process("testopia/search/advanced.html.tmpl", $vars)
|
||||
|
|
|
@ -159,7 +159,7 @@ if ($term){
|
|||
|
||||
# This is where we lookup items typed into Dojo combo boxes
|
||||
else{
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
# Environment Lookup
|
||||
if ($action eq 'getenvironments'){
|
||||
|
|
|
@ -47,7 +47,7 @@ my $type = $cgi->param('type') || '';
|
|||
$vars->{'qname'} = $cgi->param('qname');
|
||||
|
||||
if ($type eq 'completion'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my @r = $cgi->param('run_ids');
|
||||
my @p = $cgi->param('plan_ids');
|
||||
|
@ -97,7 +97,7 @@ if ($type eq 'completion'){
|
|||
exit;
|
||||
}
|
||||
elsif ($type eq 'status'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my @r = $cgi->param('run_ids');
|
||||
my @p = $cgi->param('plan_ids');
|
||||
|
@ -124,7 +124,7 @@ elsif ($type eq 'status'){
|
|||
exit;
|
||||
}
|
||||
elsif ($type eq 'execution'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my @run_ids = $cgi->param('run_ids');
|
||||
my @plan_ids = $cgi->param('plan_ids');
|
||||
|
@ -204,14 +204,14 @@ elsif ($type eq 'bar'){
|
|||
[$cgi->param('b')],
|
||||
];
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/completion.png.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
||||
}
|
||||
elsif ($type eq 'bug'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my @run_ids = $cgi->param('run_ids');
|
||||
my @plan_ids = $cgi->param('plan_ids');
|
||||
my @runs;
|
||||
|
@ -260,14 +260,14 @@ elsif ($type eq 'bug_grid'){
|
|||
$vars->{'stripheader'} = 1 if $cgi->param('noheader');
|
||||
$vars->{'uid'} = rand(10000);
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/bug-count.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
}
|
||||
|
||||
elsif ($type eq 'priority'){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my @r = $cgi->param('run_ids');
|
||||
my @plans = $cgi->param('plan_ids');
|
||||
|
@ -326,7 +326,7 @@ elsif ($type eq 'worst'){
|
|||
$vars->{'runs'} = join(',',@run_ids);
|
||||
$vars->{'plans'} = join(',',@plans);
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$template->process("testopia/reports/bar.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -385,7 +385,7 @@ if ( $format->{'extension'} eq "csv" || $format->{'extension'} eq "xml" ){
|
|||
$disp = "attachment";
|
||||
}
|
||||
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'time'} = $date;
|
||||
|
|
|
@ -42,7 +42,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $case_id = trim(Bugzilla->cgi->param('case_id')) || '';
|
||||
|
||||
unless ($case_id){
|
||||
print $cgi->header();
|
||||
$cgi->send_header();
|
||||
$template->process("testopia/case/choose.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
exit;
|
||||
|
@ -67,7 +67,7 @@ $vars->{'table'} = Testopia::Table->new('case', 'tr_list_cases.cgi', $cgi);
|
|||
my @time = localtime(time());
|
||||
my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3];
|
||||
my $filename = "testcase-$case_id-$date.$format->{extension}";
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'case'} = $case;
|
||||
|
|
|
@ -45,7 +45,7 @@ my $cgi = Bugzilla->cgi;
|
|||
my $plan_id = trim(Bugzilla->cgi->param('plan_id'));
|
||||
|
||||
unless ($plan_id){
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
$vars->{'form_action'} = 'tr_show_plan.cgi';
|
||||
$template->process("testopia/plan/choose.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -76,7 +76,7 @@ if ( $format->{'extension'} =~ /(csv|xml)/ ){
|
|||
my @time = localtime(time());
|
||||
my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3];
|
||||
my $filename = "testplan_$plan_id-$date.$format->{extension}";
|
||||
print $cgi->header(-type => $format->{'ctype'},
|
||||
$cgi->send_header(-type => $format->{'ctype'},
|
||||
-content_disposition => "$disp; filename=$filename");
|
||||
|
||||
$vars->{'percentage'} = \&percentage;
|
||||
|
|
|
@ -38,7 +38,7 @@ my $cgi = Bugzilla->cgi;
|
|||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
###############################################################################
|
||||
# tr_show_product.cgi
|
||||
|
|
|
@ -39,7 +39,7 @@ my $template = Bugzilla->template;
|
|||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
local our $run_id = trim($cgi->param('run_id') || '');
|
||||
|
||||
unless ($run_id){
|
||||
|
|
|
@ -44,7 +44,7 @@ local our $cgi = Bugzilla->cgi;
|
|||
local our $vars = {};
|
||||
local our $template = Bugzilla->template;
|
||||
|
||||
print $cgi->header;
|
||||
$cgi->send_header;
|
||||
|
||||
my $action = $cgi->param('action') || '';
|
||||
my $type = $cgi->param('type');
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue