Revisions: Correct check for ensuring comparison always from newer to older revision. props adamsilverstein. fixes #24340.

git-svn-id: https://develop.svn.wordpress.org/trunk@24263 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2013-05-15 19:09:39 +00:00
parent 2b2c46e79f
commit a5ab9e5dca

View File

@ -2134,8 +2134,8 @@ function wp_ajax_revisions_data() {
if ( ! $compare_to )
$left_revision = get_post( $post_id );
// make sure the right revision is the most recent
if ( $compare_two_mode && $right_revision->post_date < $left_revision->post_date ) {
// make sure the right revision is the most recent, except on oldest revision
if ( $compare_to && $right_revision->post_date < $left_revision->post_date ) {
$temp = $left_revision;
$left_revision = $right_revision;
$right_revision = $temp;