diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index b9c7f13d84..7c1503def8 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -2140,7 +2140,7 @@ function wp_ajax_revisions_data() { $compareto = isset( $_GET['compareto'] ) ? absint( $_GET['compareto'] ) : 0; $showautosaves = isset( $_GET['showautosaves'] ) ? $_GET['showautosaves'] : ''; $show_split_view = isset( $_GET['show_split_view'] ) ? $_GET['show_split_view'] : ''; - $postid = isset( $_GET['postid'] ) ? absint( $_GET['postid'] ) : ''; + $postid = isset( $_GET['post_id'] ) ? absint( $_GET['post_id'] ) : ''; $comparetwomode = ( '' == $postid ) ? false : true; // @@ -2149,7 +2149,6 @@ function wp_ajax_revisions_data() { //so only the possible diffs need be generated // $alltherevisions = array(); - if ( '' == $postid ) $postid = $compareto; @@ -2159,6 +2158,7 @@ function wp_ajax_revisions_data() { if ( ! $revisions = wp_get_post_revisions( $postid ) ) return; + //if we are comparing two revisions, the first 'revision' represented by the leftmost //slider position is the current revision, prepend a comparison to this revision if ( $comparetwomode ) diff --git a/wp-admin/js/revisions.js b/wp-admin/js/revisions.js index 43fb1e9848..92f3ae68ca 100644 --- a/wp-admin/js/revisions.js +++ b/wp-admin/js/revisions.js @@ -112,7 +112,7 @@ window.wp = window.wp || {}; self._right_handle_revisions.url = ajaxurl + '?action=revisions-data&compareto=' + wpRevisionsSettings.post_id + - '&wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id + + '&post_id=' + wpRevisionsSettings.post_id + '&showautosaves=' + self._autosaves + '&showsplitview=' + self._showsplitview + '&nonce=' + wpRevisionsSettings.nonce; @@ -120,7 +120,7 @@ window.wp = window.wp || {}; self._right_handle_revisions.url = ajaxurl + '?action=revisions-data&compareto=' + self._revisions.at( self._left_diff - 1 ).get( 'ID' ) + - '&wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id + + '&post_id=' + wpRevisionsSettings.post_id + '&showautosaves=' + self._autosaves + '&showsplitview=' + self._showsplitview + '&nonce=' + wpRevisionsSettings.nonce; @@ -129,7 +129,7 @@ window.wp = window.wp || {}; self._left_handle_revisions.url = ajaxurl + '?action=revisions-data&compareto=' + self._revisions.at( self._right_diff - 1 ).get( 'ID' ) + - '&wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id + + '&post_id=' + wpRevisionsSettings.post_id + '&showautosaves=' + self._autosaves + '&showsplitview=' + self._showsplitview + '&nonce=' + wpRevisionsSettings.nonce;