Make sure that the ID of the right revision is not less than the ID of the left revision
see #23497 git-svn-id: http://core.svn.wordpress.org/trunk@23832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6b79783e63
commit
ab9b0206c8
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue