Per suggestion from Josh Tolley. Along the way, correct a dubious formatting
choice in template/error.tt2.
$r->redirect('/action/commitfest_view?id=' . $d->{'commitfest_id'});
}
if ($err =~ /patch_comment_patch_id_fkey/) {
- $r->error_exit(<<EOM);
-Because this patch has one or more comments, it may not be deleted.
+ $r->error(<<EOM);
+Because this patch has one or more comments, it may not be deleted. Unless you
+are an administrator, you may only edit or delete your own comments.
EOM
}
- $r->error_exit("Internal error: $@");
+ else {
+ $r->error("Internal error: $@");
+ }
+ $r->render_template('patch_delete', { 'id' => $r->cgi_required_id });
}
sub form {
[% FOREACH one_error_in_list = error_list %]
-<p class='error'>[% one_error_in_list | htmlsafe | html_line_break %]</p>
+<p class='error'>[% one_error_in_list | htmlsafe %]</p>
[% END %]
--- /dev/null
+<p><a href='/action/patch_view?id=[% id %]'>Return to Patch</a></p>