WordPress.org

Make WordPress Core

Changeset 27273


Ignore:
Timestamp:
02/25/2014 08:06:04 PM (7 years ago)
Author:
nacin
Message:

Remove unused routing code in revisions.

props adamsilverstein.
fixes #26565.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/revisions.js

    r27114 r27273  
    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 ) );
     
    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    });
Note: See TracChangeset for help on using the changeset viewer.