summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-08-12 17:54:59 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-08-12 17:54:59 +0200
commitc3de43ee18240e8364fae0e9caeeda8cdff8f986 (patch)
treea479a02c33e75b422afd4395a004c6c2b0644cb0 /buglist.cgi
parent261bb90c5cf98eb824f6897cdc0c6c4191618115 (diff)
downloadbugzilla-c3de43ee18240e8364fae0e9caeeda8cdff8f986.tar.gz
bugzilla-c3de43ee18240e8364fae0e9caeeda8cdff8f986.tar.xz
Bug 894878 - CSV output template for request queues has gone away
r=glob
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi30
1 files changed, 10 insertions, 20 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 27badae7c..9d259de5c 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -316,22 +316,20 @@ sub GetGroups {
}
sub _close_standby_message {
- my ($contenttype, $disposition, $serverpush) = @_;
+ my ($contenttype, $disp, $disp_prefix, $extension, $serverpush) = @_;
my $cgi = Bugzilla->cgi;
+ $cgi->set_dated_content_disp($disp, $disp_prefix, $extension);
# Close the "please wait" page, then open the buglist page
if ($serverpush) {
print $cgi->multipart_end();
- print $cgi->multipart_start(-type => $contenttype,
- -content_disposition => $disposition);
+ print $cgi->multipart_start(-type => $contenttype);
}
else {
- print $cgi->header(-type => $contenttype,
- -content_disposition => $disposition);
+ print $cgi->header($contenttype);
}
}
-
################################################################################
# Command Execution
################################################################################
@@ -359,17 +357,10 @@ $params ||= new Bugzilla::CGI($cgi);
# if available. We have to do this now, even though we return HTTP headers
# at the end, because the fact that there is a remembered query gets
# forgotten in the process of retrieving it.
-my @time = localtime(time());
-my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3];
-my $filename = "bugs-$date.$format->{extension}";
+my $disp_prefix = "bugs";
if ($cmdtype eq "dorem" && $remaction =~ /^run/) {
- $filename = $cgi->param('namedcmd') . "-$date.$format->{extension}";
- # Remove white-space from the filename so the user cannot tamper
- # with the HTTP headers.
- $filename =~ s/\s/_/g;
+ $disp_prefix = $cgi->param('namedcmd');
}
-$filename =~ s/\\/\\\\/g; # escape backslashes
-$filename =~ s/"/\\"/g; # escape quotes
# Take appropriate action based on user's request.
if ($cmdtype eq "dorem") {
@@ -1030,7 +1021,8 @@ if ($one_product && Bugzilla->user->can_enter_product($one_product)) {
# The following variables are used when the user is making changes to multiple bugs.
if ($dotweak && scalar @bugs) {
if (!$vars->{'caneditbugs'}) {
- _close_standby_message('text/html', 'inline', $serverpush);
+ _close_standby_message('text/html',
+ 'inline', "error", "html", $serverpush);
ThrowUserError('auth_failure', {group => 'editbugs',
action => 'modify',
object => 'multiple_bugs'});
@@ -1137,10 +1129,8 @@ if ($format->{'extension'} eq "csv") {
$vars->{'human'} = $cgi->param('human');
}
-# Suggest a name for the bug list if the user wants to save it as a file.
-$disposition .= "; filename=\"$filename\"";
-
-_close_standby_message($contenttype, $disposition, $serverpush);
+_close_standby_message($contenttype, $disposition, $disp_prefix,
+ $format->{'extension'}, $serverpush);
################################################################################
# Content Generation