[wp-trac] [WordPress Trac] #16215: Post Revision history displays the incorrect author
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 7 07:25:40 UTC 2011
#16215: Post Revision history displays the incorrect author
-------------------------------------------------+-------------------------
Reporter: mdawaffe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Revisions | Release
Severity: normal | Version: 2.6
Keywords: dev-feedback needs-testing has- | Resolution:
patch |
-------------------------------------------------+-------------------------
Changes (by mdawaffe):
* keywords: dev-feedback needs-patch => dev-feedback needs-testing has-
patch
Comment:
attachment:ticket:16215:16215.diff
* Stores revisioning system version number in wp_posts.comment_count.
* Updates {{{_edit_last}}} post meta during {{{wp_insert_post()}}} so that
meta value is always correct.
* For new revisions, uses {{{_edit_last}}} post meta as the revision
author (the user who edited the post to that state).
* For old revisions, fixes the post_author on the fly during display.
Does ''not'' store that fix in the DB.
* Fixes display of "current revision" author in
{{{wp_list_post_revisions()}}}.
* Does ''not'' address the potential post_modified/post_date enhancement.
I took the menu_order approach outlined above in the ticket, but used
comment_count instead since a page's menu_order is actually versioned by
the revisioning system. This comment_count trick won't work if plugins
(or future core) allow comments on revisions. As an alternative, we could
hack the version into post_name.
I chose not to update the old revisions' DB rows so we could try the patch
out without committing ourselves to the (destructive) UPDATEs. UPDATEs
should be reasonably straightforward to add, and we should do UPDATEs
since the way the patch fixes on display could mix poorly with persistent
caches.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16215#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list