[wp-trac] [WordPress Trac] #24782: Revisions: Re-think the way how the current revision is detected

WordPress Trac noreply at wordpress.org
Wed Jul 17 10:25:38 UTC 2013


#24782: Revisions: Re-think the way how the current revision is detected
--------------------------+-----------------------------
 Reporter:  ocean90       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Revisions     |    Version:
 Severity:  normal        |   Keywords:  dev-feedback
--------------------------+-----------------------------
 To detect if a revision is the current one we do
 `$revision->post_modified_gmt === $post->post_modified_gmt`, see
 [source:/trunk/wp-admin/includes/revision.php:24708#L102].

 This can be an issue if you are using the API and creating revisions
 programmatically which can result in same timestamps, since we doesn't
 save milliseconds, only seconds.

 We noticed this while the GSoC project "Code revisions", see
 [https://gsoc.trac.wordpress.org/ticket/326 #gsoc326] and on
 [http://make.wordpress.org/core/2013/07/16/code-revisions-week-4/
 make/core].

 Not sure if we can do something here, but want to make it known.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24782>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list