summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-07-21 18:07:00 +0200
committerByron Jones <glob@mozilla.com>2014-07-21 18:07:00 +0200
commitb1f98ae140d188d7801ae7a268e91365e6155cb4 (patch)
treed56d3542f4a87eb1c0b621254197d773df682e74 /Bugzilla
parent7bd3b9d8bfaade262564d39e16e8e39a5690d86b (diff)
downloadbugzilla-b1f98ae140d188d7801ae7a268e91365e6155cb4.tar.gz
bugzilla-b1f98ae140d188d7801ae7a268e91365e6155cb4.tar.xz
Bug 1041559: "Please wait while your bugs are retrieved" shown above menu header for search error pages
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/CGI.pm15
-rw-r--r--Bugzilla/Error.pm4
2 files changed, 18 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 0adb46a62..a12fb284b 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -310,9 +310,24 @@ sub multipart_start {
$headers .= "Set-Cookie: ${cookie}${CGI::CRLF}";
}
$headers .= $CGI::CRLF;
+ $self->{_multipart_in_progress} = 1;
return $headers;
}
+sub close_standby_message {
+ my ($self, $contenttype, $disposition) = @_;
+
+ if ($self->{_multipart_in_progress}) {
+ print $self->multipart_end();
+ print $self->multipart_start(-type => $contenttype,
+ -content_disposition => $disposition);
+ }
+ else {
+ print $self->header(-type => $contenttype,
+ -content_disposition => $disposition);
+ }
+}
+
# Override header so we can add the cookies in
sub header {
my $self = shift;
diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm
index 41345e11b..6e3309778 100644
--- a/Bugzilla/Error.pm
+++ b/Bugzilla/Error.pm
@@ -117,9 +117,11 @@ sub _throw_error {
$vars->{maintainers_notified} = 0;
}
- print Bugzilla->cgi->header();
+ my $cgi = Bugzilla->cgi;
+ $cgi->close_standby_message('text/html', 'inline');
$template->process($name, $vars)
|| ThrowTemplateError($template->error());
+ print $cgi->multipart_final() if $cgi->{_multipart_in_progress};
if ($vars->{maintainers_notified}) {
sentry_handle_error($vars->{error}, $vars->{processed}->{error_message});