From b1343319564189da6924eacb21ba37ef05cdb935 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 28 Mar 2013 02:49:55 +0000 Subject: [PATCH] Make sure that the ID of the right revision is not less than the ID of the left revision see #23497 git-svn-id: https://develop.svn.wordpress.org/trunk@23832 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ajax-actions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 66863a356b..74c48057c9 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -2130,6 +2130,13 @@ function wp_ajax_revisions_data() { if ( 0 != $single_revision_id ) { $right_revision = get_post( $single_revision_id ); + // make sure the right revision is the most recent + if ( $compare_two_mode && $right_revision->ID < $left_revision->ID ) { + $temp = $left_revision; + $left_revision = $right_revision; + $right_revision = $temp; + } + $linesadded=0; $linesdeleted=0;