Allow new comment timestamp to be passed

Morbus Iff - May 1, 2008 - 16:12
Project:Drupal
Version:6.x-dev
Component:comment.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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().

AttachmentSize
comment_timestamp.patch399 bytes

#1

catch - May 1, 2008 - 21:28
Status:needs review» needs work

A 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.

#2

Morbus Iff - May 1, 2008 - 22:30
Status:needs work» needs review

If 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.)

#3

Morbus Iff - May 1, 2008 - 22:37

Reapplied. 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.

AttachmentSize
comment_timestamp.patch 732 bytes

#4

moshe weitzman - May 2, 2008 - 02:08
Status:needs review» reviewed & tested by the community

Works as advertised ... fapi protects us from any unauthorized user sending a timestamp.

#5

Dries - June 3, 2008 - 19:48
Status:reviewed & tested by the community» needs work

I'd love to commit this patch but it no longer applies. Needs a quick re-roll.

#6

Morbus Iff - June 7, 2008 - 13:59

Attached. Sorry for the delay. Set to RTBC after re-roll.

AttachmentSize
253577_comment_timestamp.patch 711 bytes

#7

Morbus Iff - June 7, 2008 - 14:00
Status:needs work» reviewed & tested by the community

#8

Dries - June 9, 2008 - 07:07
Status:reviewed & tested by the community» fixed

Committed to CVS. Thanks Morbus.

#9

Anonymous (not verified) - June 23, 2008 - 07:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#10

Pasqualle - August 4, 2008 - 11:03
Version:7.x-dev» 6.x-dev
Assigned to:Morbus Iff» Anonymous
Status:closed» patch (to be ported)

#11

nevergone - August 4, 2008 - 13:41
Status:patch (to be ported)» reviewed & tested by the community

This patch only works with Drupal 6.3.

AttachmentSize
comment_save.patch 580 bytes

#12

Gábor Hojtsy - September 17, 2008 - 06:23
Status:reviewed & tested by the community» fixed

6.x patch contained tabs, so fixed those before committing. Will be in next Drupal 6 release, thanks!

#13

Anonymous (not verified) - October 1, 2008 - 06:31
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.