Make WordPress Core

Ticket #23901: 23901-9.patch

File 23901-9.patch, 2.3 KB (added by azaozz, 12 years ago)
  • wp-admin/includes/ajax-actions.php

     
    21292129                        $left_revision = get_post( $post_id );
    21302130
    21312131                // make sure the right revision is the most recent
    2132                 if ( $compare_two_mode && $right_revision->ID < $left_revision->ID ) {
     2132                if ( $compare_two_mode && $right_revision->post_date < $left_revision->post_date ) {
    21332133                        $temp = $left_revision;
    21342134                        $left_revision = $right_revision;
    21352135                        $right_revision = $temp;
  • wp-includes/post-template.php

     
    13871387 *
    13881388 * Second argument controls parameters:
    13891389 *   (bool)   parent : include the parent (the "Current Revision") in the list.
     1390 *                     Deprecated (ignored), since 3.6 the revisions always include
     1391 *                     a copy of the current post.
    13901392 *   (string) format : 'list' or 'form-table'. 'list' outputs UL, 'form-table'
    13911393 *                     outputs TABLE with UI.
    13921394 *   (int)    right  : what revision is currently being viewed - used in
     
    14131415        if ( !$post = get_post( $post_id ) )
    14141416                return;
    14151417
    1416         $defaults = array( 'parent' => false, 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' );
     1418        $defaults = array( 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' );
    14171419        extract( wp_parse_args( $args, $defaults ), EXTR_SKIP );
    14181420
    14191421        if ( !$revisions = wp_get_post_revisions( $post->ID ) )
     
    14221424        /* translators: post revision: 1: when, 2: author name */
    14231425        $titlef = _x( '%1$s', 'post revision' );
    14241426
    1425         // Since 3.6 revisions include a copy of the current post data as a revision.
    1426         // The following removes that revision when $parent == false
    1427         $parent_included = _wp_get_post_revision_version( reset( $revisions ) ) > 0;
    1428         if ( $parent_included && ! $parent )
    1429                 array_shift( $revisions );
    1430         elseif ( ! $parent_included && $parent )
    1431                 array_unshift( $revisions, $post );
    1432 
    14331427        $rows = $right_checked = '';
    14341428        $class = false;
    14351429        $can_edit_post = current_user_can( 'edit_post', $post->ID );