Changeset 23831
- Timestamp:
- 03/28/2013 01:51:12 AM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r23769 r23831 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; … … 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 -
trunk/wp-admin/js/revisions.js
r23813 r23831 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
Note: See TracChangeset
for help on using the changeset viewer.