Make WordPress Core

Ticket #26565: 26565.diff

File 26565.diff, 1.1 KB (added by adamsilverstein, 11 years ago)

remove unused router code

  • src/wp-admin/js/revisions.js

     
    10481048                }
    10491049        });
    10501050
    1051         // The revisions router
    1052         // takes URLs with #hash fragments and routes them
     1051        // The revisions router.
     1052        // Maintains the URL routes so browser URL matches state.
    10531053        revisions.Router = Backbone.Router.extend({
    10541054                initialize: function( options ) {
    10551055                        this.model = options.model;
    1056                         this.routes = _.object([
    1057                                 [ this.baseUrl( '?from=:from&to=:to' ), 'handleRoute' ],
    1058                                 [ this.baseUrl( '?from=:from&to=:to' ), 'handleRoute' ]
    1059                         ]);
     1056
    10601057                        // Maintain state and history when navigating
    10611058                        this.listenTo( this.model, 'update:diff', _.debounce( this.updateUrl, 250 ) );
    10621059                        this.listenTo( this.model, 'change:compareTwoMode', this.updateUrl );
     
    10851082                                b = b ? b.id : 0;
    10861083                                a = a ? a.id : 0;
    10871084                        }
    1088 
    1089                         this.model.set({
    1090                                 from: this.model.revisions.get( parseInt( a, 10 ) ),
    1091                                 to: this.model.revisions.get( parseInt( a, 10 ) ),
    1092                                 compareTwoMode: compareTwo
    1093                         });
    10941085                }
    10951086        });
    10961087