summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas2009-08-07 02:20:34 +0000
committerRobert Haas2009-08-07 02:20:34 +0000
commit2d6aa4d1448e0ae6da8c175120bb918d63a667ff (patch)
tree8c59715783f26cb7f897052e558e5ab75edd4e7f
parentbe8e2a6f7be761fdda3cc2e7512e94abb6f22e5b (diff)
Properly record who deleted a comment.
-rw-r--r--perl-lib/PgCommitFest/PatchComment.pm6
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