WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/15/2013 07:09:39 PM (7 years ago)
Author:
ocean90
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ajax-actions.php

    r24231 r24263  
    21352135            $left_revision = get_post( $post_id );
    21362136
    2137         // make sure the right revision is the most recent
    2138         if ( $compare_two_mode && $right_revision->post_date < $left_revision->post_date ) {
     2137        // make sure the right revision is the most recent, except on oldest revision
     2138        if ( $compare_to && $right_revision->post_date < $left_revision->post_date ) {
    21392139            $temp = $left_revision;
    21402140            $left_revision = $right_revision;
Note: See TracChangeset for help on using the changeset viewer.