Ticket #24873: 24873.diff
| File 24873.diff, 1.7 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/revision.php
function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null 179 179 // Now, grab the initial diff 180 180 $compare_two_mode = is_numeric( $from ); 181 181 if ( ! $compare_two_mode ) { 182 $from = array_keys( array_slice( $revisions, array_search( $selected_revision_id, array_keys( $revisions ) ) - 1, 1, true ) ); 183 $from = $from[0]; 182 $found = array_search( $selected_revision_id, array_keys( $revisions ) ); 183 if ( $found ) 184 $from = array_shift( array_keys( array_slice( $revisions, $found - 1, 1, true ) ) ); 185 else 186 $from = 0; 184 187 } 185 188 186 189 $from = absint( $from ); -
wp-admin/js/revisions.js
window.wp = window.wp || {}; 155 155 this.listenTo( this.slider, 'hovered:revision', this.updateRevision ); 156 156 this.listenTo( this.slider, 'change:hovering', this.setHovering ); 157 157 this.listenTo( this.slider, 'change:scrubbing', this.setScrubbing ); 158 159 this.set({ revision: this.revisions.get( this.frame.get('to') ) });160 158 }, 161 159 162 160 … … window.wp = window.wp || {}; 754 752 }, 755 753 756 754 prepare: function() { 757 return _.extend( { type: 'tooltip' }, { 758 attributes: this.model.get('revision').toJSON() 759 }); 755 if ( _.isNull( this.model.get('revision') ) ) 756 return; 757 else 758 return _.extend( { type: 'tooltip' }, { 759 attributes: this.model.get('revision').toJSON() 760 }); 760 761 }, 761 762 762 763 render: function() {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)