Ticket #23497: 23497.40.diff
File 23497.40.diff, 2.6 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
2130 2130 if ( 0 != $single_revision_id ) { 2131 2131 $right_revision = get_post( $single_revision_id ); 2132 2132 2133 //2134 //make sure the left revision is the most recent2135 //2136 2137 if ( strtotime( $right_revision->post_modified_gmt ) < strtotime( $left_revision->post_modified_gmt ) ) {2138 $temp = $left_revision;2139 $left_revision = $right_revision;2140 $right_revision = $temp;2141 }2142 2143 2133 $linesadded=0; 2144 2134 $linesdeleted=0; 2145 2135 … … 2182 2172 exit(); 2183 2173 } //end single model fetch 2184 2174 2185 //fetch the list of revisions available2186 2187 //if we are comparing two revisions, the first 'revision' represented by the leftmost2188 //slider position is the current revision, prepend a comparison to this revision2189 if ( ! wp_first_revision_matches_current_version( $post_id ) ) //revisions don't have current version2190 array_unshift( $revisions, get_post( $post_id ) ) ;2191 //$revisions->append ( get_post( $post_id ) );2192 //error_log( var_dump( $revisions ));2193 2175 $count = -1; 2194 2176 2195 2177 //reverse the list to start with oldes revision -
wp-admin/js/revisions.js
465 465 // add tooltips to the handles 466 466 if ( 2 === REVAPP._compareOneOrTwo ) { 467 467 REVAPP.addTooltip ( $( 'a.ui-slider-handle.left-handle' ), 468 ( REVAPP._ rightDiff >= REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._leftDiff).get( 'revision_date_author_short' ) );468 ( REVAPP._leftDiff < 0 ) ? '' : REVAPP._revisions.at( REVAPP._leftDiff - 1 ).get( 'revision_date_author_short' ) ); 469 469 REVAPP.addTooltip ( $( 'a.ui-slider-handle.right-handle' ), 470 ( REVAPP._rightDiff > = REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._rightDiff).get( 'revision_date_author_short' ) );470 ( REVAPP._rightDiff > REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._rightDiff - 1 ).get( 'revision_date_author_short' ) ); 471 471 } else { 472 472 REVAPP.addTooltip ( $( 'a.ui-slider-handle' ), 473 ( REVAPP._rightDiff > = REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._rightDiff).get( 'revision_date_author_short' ) );473 ( REVAPP._rightDiff > REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._rightDiff - 1 ).get( 'revision_date_author_short' ) ); 474 474 } 475 475 476 476 // hide the restore button when on the last sport/current post data