Commit a4185828 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 140770 - Navigation doesn't work after creating a new bug. This fix displays…

Bug 140770 - Navigation doesn't work after creating a new bug. This fix displays a new bug to the user immediately after it's been filed. Patch by gerv; r=justdave, afranke.
parent 81d43fa4
...@@ -28,6 +28,7 @@ use strict; ...@@ -28,6 +28,7 @@ use strict;
use lib qw(.); use lib qw(.);
require "CGI.pl"; require "CGI.pl";
require "bug_form.pl";
# Shut up misguided -w warnings about "used only once". For some reason, # Shut up misguided -w warnings about "used only once". For some reason,
# "use vars" chokes on me when I try it here. # "use vars" chokes on me when I try it here.
...@@ -302,9 +303,14 @@ $mailresults .= $_ while <PMAIL>; ...@@ -302,9 +303,14 @@ $mailresults .= $_ while <PMAIL>;
close(PMAIL); close(PMAIL);
# Tell the user all about it # Tell the user all about it
$vars->{'bug_id'} = $id; $vars->{'id'} = $id;
$vars->{'mailresults'} = $mailresults; $vars->{'mail'} = $mailresults;
$vars->{'type'} = "created";
print "Content-type: text/html\n\n"; print "Content-type: text/html\n\n";
$template->process("bug/create/created.html.tmpl", $vars) $template->process("bug/create/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
$::FORM{'id'} = $id;
show_bug("header is already done");
...@@ -20,28 +20,11 @@ ...@@ -20,28 +20,11 @@
#%] #%]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Bug $bug_id Submitted" title = "Bug $id Submitted"
%] %]
<table border="1"> [% PROCESS bug/process/results.html.tmpl %]
<tr>
<td>
<h2>Bug [% bug_id %] has been added to the database.</h2>
[% mailresults %] <br>
</td> [%# post_bug.cgi will add a copy of the filed bug below here %]
<td>
<a href="show_bug.cgi?id=[% bug_id %]">Back To Bug# [% bug_id %]</a>
</td>
</tr>
</table>
<p>
<a href="attachment.cgi?bugid=[% bug_id %]&amp;action=enter">
Attach a file to this bug</a>.
</p>
[% PROCESS bug/navigate.html.tmpl %]
[% PROCESS global/footer.html.tmpl %]
...@@ -31,17 +31,18 @@ ...@@ -31,17 +31,18 @@
[% [%
title = { title = {
'bug' => "Changes submitted for bug" , 'bug' => "Changes submitted for bug $id" ,
'dupe' => "Duplicate notation added to bug" , 'dupe' => "Duplicate notation added to bug $id" ,
'dep' => "Checking for dependency changes on bug" , 'dep' => "Checking for dependency changes on bug $id" ,
'votes' => "Confirmed by number of votes: bug" , 'votes' => "Bug $id confirmed by number of votes" ,
'created' => "Bug $id has been added to the database" ,
} }
%] %]
<table border="1"> <table border="1">
<tr> <tr>
<td> <td>
<h2>[% title.$type %] [%+ id %]</h2> <h2>[% title.$type %]</h2>
[% mail %] [% mail %]
</td> </td>
<td> <td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment