projects
/
pgcommitfest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be8e2a6
)
Properly record who deleted a comment.
author
Robert Haas
<
[email protected]
>
Fri, 7 Aug 2009 02:20:34 +0000
(22:20 -0400)
committer
Robert Haas
<
[email protected]
>
Fri, 7 Aug 2009 02:20:34 +0000
(22:20 -0400)
perl-lib/PgCommitFest/PatchComment.pm
patch
|
blob
|
blame
|
history
diff --git
a/perl-lib/PgCommitFest/PatchComment.pm
b/perl-lib/PgCommitFest/PatchComment.pm
index e3993faf3189226f906ddd26223de7938d04bf81..0f1e3432056f6a14f5d18ad3e07bb8107579f3d0 100644
(file)
--- 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