Wrong timestamp for new article/discussion #16

Closed
linc opened this Issue Apr 8, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@linc
Owner

linc commented Apr 8, 2012

http://icrontic.com/discussion/comment/831347#Comment_831347

Probably only effects discussion's DateInserted, not comments.

@ghost ghost assigned linc Apr 11, 2012

@austins

This comment has been minimized.

Show comment Hide comment
@austins

austins Nov 6, 2012

Here's a workaround that I just came up with that reinserts DateUpdated and DateLastComment into the new discussion that is created after the WP post is published. It seemed to do the trick when I tested it several minutes ago.

At the end of function glue_add_discussion($postid) in glue.php:

// Workaround for incorrect DateUpdated and DateLastComment timestamps after the discussion is created on Vanilla. 
// Reinserts DateUpdated and DateLastComment to the newly created discussion on Vanilla. 
global $wpdb; 
$wpdb->update(VANILLA_PREFIX.'Discussion', array('DateUpdated' => $the_post->post_date, 'DateLastComment' => $the_post->post_date), array('DiscussionID' => $DiscussionID));

austins commented Nov 6, 2012

Here's a workaround that I just came up with that reinserts DateUpdated and DateLastComment into the new discussion that is created after the WP post is published. It seemed to do the trick when I tested it several minutes ago.

At the end of function glue_add_discussion($postid) in glue.php:

// Workaround for incorrect DateUpdated and DateLastComment timestamps after the discussion is created on Vanilla. 
// Reinserts DateUpdated and DateLastComment to the newly created discussion on Vanilla. 
global $wpdb; 
$wpdb->update(VANILLA_PREFIX.'Discussion', array('DateUpdated' => $the_post->post_date, 'DateLastComment' => $the_post->post_date), array('DiscussionID' => $DiscussionID));

@linc linc closed this May 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment