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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

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.

Morbus Iff’s picture

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

Morbus Iff’s picture

FileSize
732 bytes

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.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

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

Dries’s picture

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.

Morbus Iff’s picture

FileSize
711 bytes

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

Morbus Iff’s picture

Status: Needs work » Reviewed & tested by the community
Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS. Thanks Morbus.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

Pasqualle’s picture

Version: 7.x-dev » 6.x-dev
Assigned: Morbus Iff » Unassigned
Status: Closed (fixed) » Patch (to be ported)
nevergone’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
FileSize
580 bytes

This patch only works with Drupal 6.3.

Gábor Hojtsy’s picture

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!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

cor3huis’s picture

Assigned: Unassigned » cor3huis
Status: Closed (won't fix) » Active

The original issue was invalid to begin with, "node_presave" should have been used I bet.

Damien Tournoud’s picture

Component: comment.module » node.module

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

cor3huis’s picture

Assigned: cor3huis » Unassigned
Status: Active » Needs review

THX

cor3huis’s picture

Status: Closed (fixed) » Closed (won't fix)

Status: Needs review » Closed (won't fix)