RCFilters: Remove redundant replaceUpdatedUrl method
authorMoriel Schottlender <moriel@gmail.com>
Thu, 2 Nov 2017 23:48:45 +0000 (16:48 -0700)
committerSbisson <sbisson@wikimedia.org>
Wed, 8 Nov 2017 01:07:51 +0000 (01:07 +0000)
The method should call updateURL anyways. If it's initializing, the
comparison to the original URL will still be false and the system
will apply replaceState on the URL.

Change-Id: Ibfa104ed2aba94a5c17ed8ce3580a089d60e4d97

resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js

index d1092a1..28b94e4 100644 (file)
         * without adding an history entry.
         */
        mw.rcfilters.Controller.prototype.replaceUrl = function () {
         * without adding an history entry.
         */
        mw.rcfilters.Controller.prototype.replaceUrl = function () {
-               this.uriProcessor.replaceUpdatedUri();
+               this.uriProcessor.updateURL();
        };
 
        /**
        };
 
        /**
index 0e20e3f..c25aa73 100644 (file)
                return Number( uriQuery.urlversion || 1 );
        };
 
                return Number( uriQuery.urlversion || 1 );
        };
 
-       /**
-        * Replace the current URI with an updated one from the model state
-        */
-       mw.rcfilters.UriProcessor.prototype.replaceUpdatedUri = function () {
-               this.constructor.static.replaceState( this.getUpdatedUri() );
-       };
-
        /**
         * Get an updated mw.Uri object based on the model state
         *
        /**
         * Get an updated mw.Uri object based on the model state
         *