Make WordPress Core

Ticket #23497: 23497.12.diff

File 23497.12.diff, 2.6 KB (added by adamsilverstein, 10 years ago)

correct ajax calls

  • wp-admin/includes/ajax-actions.php

     
    21402140        $compareto = isset( $_GET['compareto'] ) ? absint( $_GET['compareto'] ) : 0;
    21412141        $showautosaves = isset( $_GET['showautosaves'] ) ? $_GET['showautosaves'] : '';
    21422142        $show_split_view = isset( $_GET['show_split_view'] ) ? $_GET['show_split_view'] : '';
    2143         $postid = isset( $_GET['postid'] ) ? absint( $_GET['postid'] ) : '';
     2143        $postid = isset( $_GET['post_id'] ) ? absint( $_GET['post_id'] ) : '';
    21442144
    21452145        $comparetwomode = ( '' == $postid ) ? false : true;
    21462146        //
     
    21492149        //so only the possible diffs need be generated
    21502150        //
    21512151        $alltherevisions = array();
    2152 
    21532152        if ( '' == $postid )
    21542153                $postid = $compareto;
    21552154
     
    21592158        if ( ! $revisions = wp_get_post_revisions( $postid ) )
    21602159                return;
    21612160
     2161
    21622162        //if we are comparing two revisions, the first 'revision' represented by the leftmost
    21632163        //slider position is the current revision, prepend a comparison to this revision
    21642164        if ( $comparetwomode )
  • wp-admin/js/revisions.js

     
    112112                                        self._right_handle_revisions.url =
    113113                                                ajaxurl +
    114114                                                '?action=revisions-data&compareto=' + wpRevisionsSettings.post_id +
    115                                                 '&wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id +
     115                                                '&post_id=' + wpRevisionsSettings.post_id +
    116116                                                '&showautosaves=' + self._autosaves +
    117117                                                '&showsplitview=' +  self._showsplitview +
    118118                                                '&nonce=' + wpRevisionsSettings.nonce;
     
    120120                                        self._right_handle_revisions.url =
    121121                                                ajaxurl +
    122122                                                '?action=revisions-data&compareto=' + self._revisions.at( self._left_diff - 1 ).get( 'ID' ) +
    123                                                 '&wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id +
     123                                                '&post_id=' + wpRevisionsSettings.post_id +
    124124                                                '&showautosaves=' + self._autosaves +
    125125                                                '&showsplitview=' +  self._showsplitview +
    126126                                                '&nonce=' + wpRevisionsSettings.nonce;
     
    129129                                self._left_handle_revisions.url =
    130130                                        ajaxurl +
    131131                                        '?action=revisions-data&compareto=' + self._revisions.at( self._right_diff - 1 ).get( 'ID' ) +
    132                                         '&wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id +
     132                                        '&post_id=' + wpRevisionsSettings.post_id +
    133133                                        '&showautosaves=' + self._autosaves +
    134134                                        '&showsplitview=' +  self._showsplitview +
    135135                                        '&nonce=' + wpRevisionsSettings.nonce;