diff options
author | Robert Haas | 2009-07-03 23:09:49 +0000 |
---|---|---|
committer | Robert Haas | 2009-07-03 23:10:45 +0000 |
commit | faaa39d1777c692be519a4b1707dee7e1872b2cc (patch) | |
tree | 92df0bc094d1cccb0402f6c6f5251ca533df440a /perl-lib | |
parent | 7b3aa28d36e8f11b875e9c47a4846e81e3530202 (diff) |
Include name of patch in subject line when adding/editing a patch comment.
Also include some directions on the patch comment form, to indicate that
the message-ID is optional.
Per suggestions from Tom Lane.
Diffstat (limited to 'perl-lib')
-rw-r--r-- | perl-lib/PgCommitFest/PatchComment.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-lib/PgCommitFest/PatchComment.pm b/perl-lib/PgCommitFest/PatchComment.pm index 036ff3c..78f3a79 100644 --- a/perl-lib/PgCommitFest/PatchComment.pm +++ b/perl-lib/PgCommitFest/PatchComment.pm @@ -41,10 +41,9 @@ sub form { my $d; my $id = $r->cgi_id(); if (defined $id) { - $r->set_title('Edit Patch Comment'); $d = $r->db->select_one(<<EOM, $id); -SELECT id, patch_id, patch_comment_type_id AS patch_comment_type, message_id, - content, creator FROM patch_comment WHERE id = ? +SELECT id, patch_id, patch_name, patch_comment_type_id AS patch_comment_type, + message_id, content, creator FROM patch_comment_view WHERE id = ? EOM $r->error_exit('Patch comment not found.') if !defined $d; if (! $aa->{'is_administrator'} @@ -53,13 +52,14 @@ EOM Only administrators can edit comments created by other users. EOM } + $r->set_title('Edit Patch Comment: ' . $d->{'patch_name'}); } else { $d = $r->db->select_one(<<EOM, $r->cgi_required_id('patch')); -SELECT id AS patch_id FROM patch WHERE id = ? +SELECT id AS patch_id, name AS patch_name FROM patch WHERE id = ? EOM $r->error_exit('Patch not found.') if !defined $d; - $r->set_title('New Patch Comment'); + $r->set_title('New Patch Comment: ' . $d->{'patch_name'}); } $r->redirect('/action/patch_view?id=' . $d->{'patch_id'}) if $r->cgi('cancel'); |