Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We allow nodes to receive their 'created' date passed into node_save(). The nearest analog to a comment's "created" date, however, is 'timestamp'. Timestamp isn't settable from outside comment_save(); some modules (such as mailhandler) just /assume/ that it is. This patch is necessary for imports from other applications, but also matches the patterns already established in node_save().
Comment | File | Size | Author |
---|---|---|---|
#11 | comment_save.patch | 580 bytes | nevergone |
#6 | 253577_comment_timestamp.patch | 711 bytes | Morbus Iff |
#3 | comment_timestamp.patch | 732 bytes | Morbus Iff |
comment_timestamp.patch | 399 bytes | Morbus Iff | |
Comments
Comment #1
catchA couple of things
patch is missing -u option (I am deeply shocked)
I think we should have 'created' and 'updated' timestamps for comments, this may be out of scope though.
Comment #2
Morbus IffIf the way a patch was generated is a code quality issue, please set this back. Otherwise, pithy.
(And yeah, I agree: created/updated timestamps are out of scope here.)
Comment #3
Morbus IffReapplied. This was the first time I had used cvs since I reinstalled the OS, so didn't have a .cvsrc file with the proper diff settings.
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedWorks as advertised ... fapi protects us from any unauthorized user sending a timestamp.
Comment #5
Dries CreditAttribution: Dries commentedI'd love to commit this patch but it no longer applies. Needs a quick re-roll.
Comment #6
Morbus IffAttached. Sorry for the delay. Set to RTBC after re-roll.
Comment #7
Morbus IffComment #8
Dries CreditAttribution: Dries commentedCommitted to CVS. Thanks Morbus.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
PasqualleComment #11
nevergone CreditAttribution: nevergone commentedThis patch only works with Drupal 6.3.
Comment #12
Gábor Hojtsy6.x patch contained tabs, so fixed those before committing. Will be in next Drupal 6 release, thanks!
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #14
cor3huis CreditAttribution: cor3huis commentedThe original issue was invalid to begin with, "node_presave" should have been used I bet.
Comment #15
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis is *not* the same issue. This issue was about *comments*.
I not sure I understand what you believe needs fixing in node_save(): by design, you can set $node->created, but not $node->changed, which will always be the timestamp of when node_save() was called.
Anyway, really not the same issue. Please open a different issue (targeted at Drupal 7, we always fix bug in the highest version first) and describe your use case there.
Comment #16
cor3huis CreditAttribution: cor3huis commentedTHX
Comment #17
cor3huis CreditAttribution: cor3huis commented