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
This commit is contained in:
Mark Jaquith 2013-03-28 02:49:55 +00:00
parent 240dc4b968
commit b134331956
1 changed files with 7 additions and 0 deletions

View File

@ -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;