diff options
author | Robert Haas | 2009-08-07 02:20:34 +0000 |
---|---|---|
committer | Robert Haas | 2009-08-07 02:20:34 +0000 |
commit | 2d6aa4d1448e0ae6da8c175120bb918d63a667ff (patch) | |
tree | 8c59715783f26cb7f897052e558e5ab75edd4e7f | |
parent | be8e2a6f7be761fdda3cc2e7512e94abb6f22e5b (diff) |
Properly record who deleted a comment.
-rw-r--r-- | perl-lib/PgCommitFest/PatchComment.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-lib/PgCommitFest/PatchComment.pm b/perl-lib/PgCommitFest/PatchComment.pm index e3993fa..0f1e343 100644 --- a/perl-lib/PgCommitFest/PatchComment.pm +++ b/perl-lib/PgCommitFest/PatchComment.pm @@ -31,6 +31,12 @@ Only administrators can delete comments created by other users. EOM } } + # Don't bump last_updated_time, as that would trigger an activity log + # record. But do change the last_updater, so that the subsequent + # delete picks up the correct user id. This is a pretty ugly kludge, + # but I don't immediately have a better idea. + $r->db->update('patch_comment', { 'id' => $id }, + { 'last_updater' => $aa->{'userid'} }); $d = $r->db->select_one(<<EOM, $id); DELETE FROM patch_comment WHERE id = ? RETURNING patch_id EOM |