RCFilters: Make live update polling configurable
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / mw.rcfilters.Controller.js
index 507c979..ed2a73f 100644 (file)
                this.initializing = false;
                this.switchView( 'default' );
 
-               this._scheduleLiveUpdate();
+               this.pollingRate = mw.config.get( 'StructuredChangeFiltersLiveUpdatePollingRate' );
+               if ( this.pollingRate ) {
+                       this._scheduleLiveUpdate();
+               }
        };
 
        /**
         * @private
         */
        mw.rcfilters.Controller.prototype._scheduleLiveUpdate = function () {
-               setTimeout( this._doLiveUpdate.bind( this ), 3000 );
+               setTimeout( this._doLiveUpdate.bind( this ), this.pollingRate * 1000 );
        };
 
        /**