Merge "Record user login timing"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 4 Aug 2017 20:03:24 +0000 (20:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 4 Aug 2017 20:03:24 +0000 (20:03 +0000)
30 files changed:
includes/DefaultSettings.php
includes/Title.php
includes/resourceloader/ResourceLoaderMediaWikiUtilModule.php
includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDoubleRedirects.php
includes/specials/SpecialImport.php
includes/specials/SpecialListredirects.php
includes/specials/pagers/ContribsPager.php
languages/i18n/en.json
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-core-apex.css
resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-core.js
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-toolbars.js
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-widgets.js
resources/lib/oojs-ui/oojs-ui-wikimediaui.js
resources/lib/oojs-ui/oojs-ui-windows-apex.css
resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-windows.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.rcfilters/mw.rcfilters.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js

index 8e38121..51320e2 100644 (file)
@@ -4133,6 +4133,7 @@ $wgContentNamespaces = [ NS_MAIN ];
  * Optional array of namespaces which should be blacklisted from Special:ShortPages
  * Only pages inside $wgContentNamespaces but not $wgShortPagesNamespaceBlacklist will
  * be shown on that page.
+ * @since 1.30
  */
 $wgShortPagesNamespaceBlacklist = [];
 
index 7b3e3a5..5decece 100644 (file)
@@ -1322,6 +1322,8 @@ class Title implements LinkTarget {
         * Get a Title object associated with the talk page of this article,
         * if such a talk page can exist.
         *
+        * @since 1.30
+        *
         * @return Title The object for the talk page,
         *         or null if no associated talk page can exist, according to canHaveTalkPage().
         */
index 1fe3434..166f1ba 100644 (file)
@@ -37,6 +37,13 @@ class ResourceLoaderMediaWikiUtilModule extends ResourceLoaderFileModule {
                        . parent::getScript( $context );
        }
 
+       /**
+        * @inheritdoc
+        */
+       public function supportsURLLoading() {
+               return false;
+       }
+
        /**
         * @inheritdoc
         */
index cd9345d..cf9ae07 100644 (file)
@@ -66,6 +66,7 @@ class BrokenRedirectsPage extends QueryPage {
                                'value' => 'p1.page_title',
                                'rd_namespace',
                                'rd_title',
+                               'rd_fragment',
                        ],
                        'conds' => [
                                // Exclude pages that don't exist locally as wiki pages,
@@ -102,7 +103,7 @@ class BrokenRedirectsPage extends QueryPage {
        function formatResult( $skin, $result ) {
                $fromObj = Title::makeTitle( $result->namespace, $result->title );
                if ( isset( $result->rd_title ) ) {
-                       $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title );
+                       $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title, $result->rd_fragment );
                } else {
                        $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check for redirect, not for links
                        if ( $blinks ) {
@@ -139,7 +140,7 @@ class BrokenRedirectsPage extends QueryPage {
                                [ 'action' => 'edit' ]
                        );
                }
-               $to = $linkRenderer->makeBrokenLink( $toObj );
+               $to = $linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() );
                $arr = $this->getLanguage()->getArrow();
 
                $out = $from . $this->msg( 'word-separator' )->escaped();
index 3845649..1b14fcb 100644 (file)
@@ -131,17 +131,14 @@ class SpecialContributions extends IncludableSpecialPage {
 
                $skip = $request->getText( 'offset' ) || $request->getText( 'dir' ) == 'prev';
                # Offset overrides year/month selection
-               if ( $skip ) {
-                       $this->opts['year'] = '';
-                       $this->opts['month'] = '';
-               } else {
+               if ( !$skip ) {
                        $this->opts['year'] = $request->getVal( 'year' );
                        $this->opts['month'] = $request->getVal( 'month' );
 
                        $this->opts['start'] = $request->getVal( 'start' );
                        $this->opts['end'] = $request->getVal( 'end' );
-                       $this->opts = ContribsPager::processDateFilter( $this->opts );
                }
+               $this->opts = ContribsPager::processDateFilter( $this->opts );
 
                $feedType = $request->getVal( 'feed' );
 
index d7e99db..64b378c 100644 (file)
@@ -73,6 +73,7 @@ class DoubleRedirectsPage extends QueryPage {
                                // not actually be a page table row for this target (e.g. for interwiki redirects)
                                'nsc' => 'rb.rd_namespace',
                                'tc' => 'rb.rd_title',
+                               'fc' => 'rb.rd_fragment',
                                'iwc' => 'rb.rd_interwiki',
                        ],
                        'conds' => [
@@ -146,7 +147,7 @@ class DoubleRedirectsPage extends QueryPage {
                }
 
                $titleB = Title::makeTitle( $result->nsb, $result->tb );
-               $titleC = Title::makeTitle( $result->nsc, $result->tc, '', $result->iwc );
+               $titleC = Title::makeTitle( $result->nsc, $result->tc, $result->fc, $result->iwc );
 
                $linkA = $linkRenderer->makeKnownLink(
                        $titleA,
@@ -179,7 +180,7 @@ class DoubleRedirectsPage extends QueryPage {
                        [ 'redirect' => 'no' ]
                );
 
-               $linkC = $linkRenderer->makeKnownLink( $titleC );
+               $linkC = $linkRenderer->makeKnownLink( $titleC, $titleC->getFullText() );
 
                $lang = $this->getLanguage();
                $arr = $lang->getArrow() . $lang->getDirMark();
index a827e89..beb454d 100644 (file)
@@ -173,10 +173,8 @@ class SpecialImport extends SpecialPage {
 
                $out = $this->getOutput();
                if ( !$source->isGood() ) {
-                       $out->wrapWikiMsg(
-                               "<p class=\"error\">\n$1\n</p>",
-                               [ 'importfailed', $source->getWikiText() ]
-                       );
+                       $out->addWikiText( "<p class=\"error\">\n" .
+                               $this->msg( 'importfailed', $source->getWikiText() )->parse() . "\n</p>" );
                } else {
                        $importer = new WikiImporter( $source->value, $this->getConfig() );
                        if ( !is_null( $this->namespace ) ) {
index 5f38629..f81c03c 100644 (file)
@@ -137,7 +137,7 @@ class ListredirectsPage extends QueryPage {
                        # Make a link to the destination page
                        $lang = $this->getLanguage();
                        $arr = $lang->getArrow() . $lang->getDirMark();
-                       $targetLink = $linkRenderer->makeLink( $target );
+                       $targetLink = $linkRenderer->makeLink( $target, $target->getFullText() );
 
                        return "$rd_link $arr $targetLink";
                } else {
index 6bd7eb0..d7819c4 100644 (file)
@@ -583,10 +583,10 @@ class ContribsPager extends RangeChronologicalPager {
         * @return array Options array with processed start and end date filter options
         */
        public static function processDateFilter( $opts ) {
-               $start = $opts['start'] ?: '';
-               $end = $opts['end'] ?: '';
-               $year = $opts['year'] ?: '';
-               $month = $opts['month'] ?: '';
+               $start = isset( $opts['start'] ) ? $opts['start'] : '';
+               $end = isset( $opts['end'] ) ? $opts['end'] : '';
+               $year = isset( $opts['year'] ) ? $opts['year'] : '';
+               $month = isset( $opts['month'] ) ? $opts['month'] : '';
 
                if ( $start !== '' && $end !== '' && $start > $end ) {
                        $temp = $start;
index e29b6b5..aa1254c 100644 (file)
        "import-nonewrevisions": "No revisions imported (all were either already present, or skipped due to errors).",
        "xml-error-string": "$1 at line $2, col $3 (byte $4): $5",
        "import-upload": "Upload XML data",
-       "import-token-mismatch": "Loss of session data.\n\nYou might have been logged out. <strong>Please verify that you're still logged in and try again</strong>.\nIf it still does not work, try [[Special:UserLogout|logging out]] and logging back in, and check that your browser allows cookies from this site.",
+       "import-token-mismatch": "Loss of session data.\n\nYou might have been logged out. '''Please verify that you're still logged in and try again'''.\nIf it still does not work, try [[Special:UserLogout|logging out]] and logging back in, and check that your browser allows cookies from this site.",
        "import-invalid-interwiki": "Cannot import from the specified wiki.",
        "import-error-edit": "Page \"$1\" was not imported because you are not allowed to edit it.",
        "import-error-create": "Page \"$1\" was not imported because you are not allowed to create it.",
index 0253ff5..717df5d 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
index 5a49a2d..718ae20 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 .oo-ui-element-hidden {
   display: none !important;
index d7b1429..551dda9 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 /**
  * WikimediaUI Base v0.9.2
 .oo-ui-buttonElement-framed.oo-ui-widget-disabled > .oo-ui-buttonElement-button {
   background-color: #c8ccd1;
   color: #fff;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled > .oo-ui-buttonElement-button {
   background-color: #f8f9fa;
@@ -1176,11 +1176,11 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 }
 .oo-ui-checkboxInputWidget [type='checkbox']:disabled + span {
   background-color: #c8ccd1;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-checkboxInputWidget [type='checkbox']:disabled:hover + span {
   background-color: #c8ccd1;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-checkboxInputWidget.oo-ui-widget-enabled [type='checkbox'] {
   cursor: pointer;
@@ -1316,7 +1316,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 .oo-ui-dropdownInputWidget.oo-ui-widget-disabled select {
   background-color: #eaecf0;
   color: #72777d;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-radioInputWidget {
   position: relative;
@@ -1366,7 +1366,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 }
 .oo-ui-radioInputWidget [type='radio']:disabled + span {
   background-color: #c8ccd1;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-radioInputWidget [type='radio']:disabled:checked + span {
   background-color: #fff;
@@ -1607,7 +1607,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   -webkit-text-fill-color: #72777d;
   color: #72777d;
   text-shadow: 0 1px 1px #fff;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,
 .oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
@@ -1792,7 +1792,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle {
   color: #72777d;
   text-shadow: 0 1px 1px #fff;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   background-color: #eaecf0;
 }
 .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle:focus {
index 4300e88..a988269 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
index 8033773..a842a1c 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 .oo-ui-popupTool .oo-ui-popupWidget-popup,
 .oo-ui-popupTool .oo-ui-popupWidget-anchor {
index 9865ef9..057ff0f 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 /**
  * WikimediaUI Base v0.9.2
index 322ff02..aba8e37 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
index ec379f7..1194ca9 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 .oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget {
   cursor: move;
index 39965a6..0483dae 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 /**
  * WikimediaUI Base v0.9.2
 }
 .oo-ui-toggleSwitchWidget.oo-ui-widget-disabled {
   background-color: #c8ccd1;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   outline: 0;
 }
 .oo-ui-toggleSwitchWidget.oo-ui-widget-disabled.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-grip {
 .oo-ui-selectFileWidget-empty.oo-ui-widget-disabled .oo-ui-selectFileWidget-info {
   background-color: #eaecf0;
   color: #72777d;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   text-shadow: 0 1px 1px #fff;
 }
 .oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon,
 .oo-ui-selectFileWidget.oo-ui-widget-disabled.oo-ui-selectFileWidget-dropTarget,
 .oo-ui-selectFileWidget-empty.oo-ui-widget-disabled.oo-ui-selectFileWidget-dropTarget {
   background-color: #eaecf0;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-info {
   background-color: #eaecf0;
   color: #222;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-selectFileWidget-notsupported.oo-ui-selectFileWidget-dropTarget {
   background-color: #eaecf0;
-  border-color: #72777d;
+  border-color: #c8ccd1;
 }
 .oo-ui-selectFileWidget-notsupported.oo-ui-selectFileWidget-dropTarget .oo-ui-selectFileWidget-label {
   padding: 1em 0.9375em;
 .oo-ui-tagMultiselectWidget.oo-ui-widget-disabled .oo-ui-tagMultiselectWidget-handle {
   color: #72777d;
   text-shadow: 0 1px 1px #fff;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   background-color: #eaecf0;
 }
 .oo-ui-tagMultiselectWidget.oo-ui-widget-disabled .oo-ui-tagMultiselectWidget-handle > .oo-ui-iconElement-icon {
 .oo-ui-tagItemWidget.oo-ui-widget-disabled {
   background-color: #eaecf0;
   color: #72777d;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   text-shadow: 0 1px 1px #fff;
 }
 .oo-ui-tagItemWidget.oo-ui-widget-disabled:focus {
 .oo-ui-capsuleMultiselectWidget.oo-ui-widget-disabled .oo-ui-capsuleMultiselectWidget-handle {
   color: #72777d;
   text-shadow: 0 1px 1px #fff;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   background-color: #eaecf0;
 }
 .oo-ui-capsuleMultiselectWidget.oo-ui-widget-disabled .oo-ui-capsuleMultiselectWidget-handle > .oo-ui-iconElement-icon {
 .oo-ui-capsuleItemWidget.oo-ui-widget-disabled {
   background-color: #eaecf0;
   color: #72777d;
-  border-color: #72777d;
+  border-color: #c8ccd1;
   text-shadow: 0 1px 1px #fff;
 }
 .oo-ui-capsuleItemWidget.oo-ui-widget-disabled > .oo-ui-buttonElement {
index 27bbdd5..18695bf 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
index e2b5272..8c4fee7 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
index b085584..79f340f 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 .oo-ui-actionWidget.oo-ui-pendingElement-pending {
   background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
index 8804b79..d7fadd0 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T20:24:44Z
+ * Date: 2017-08-03T19:36:56Z
  */
 /**
  * WikimediaUI Base v0.9.2
index 97e6326..c53111f 100644 (file)
@@ -6,7 +6,7 @@
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
index f7021e2..6acc44d 100644 (file)
         *  is a part of.
         * @cfg {boolean} [isSticky] This group is using a 'sticky' default; meaning
         *  that every time a value is changed, it becomes the new default
+        * @cfg {boolean} [excludedFromSavedQueries] A specific requirement to exclude
+        *  this filter from saved queries. This is always true if the filter is 'sticky'
+        *  but can be used for non-sticky filters as an additional requirement. Similarly
+        *  to 'sticky' it works for the entire group as a whole.
         * @cfg {string} [title] Group title
         * @cfg {boolean} [hidden] This group is hidden from the regular menu views
         * @cfg {boolean} [allowArbitrary] Allows for an arbitrary value to be added to the
@@ -44,6 +48,7 @@
                this.type = config.type || 'send_unselected_if_any';
                this.view = config.view || 'default';
                this.sticky = !!config.isSticky;
+               this.excludedFromSavedQueries = this.sticky || !!config.excludedFromSavedQueries;
                this.title = config.title || name;
                this.hidden = !!config.hidden;
                this.allowArbitrary = !!config.allowArbitrary;
        mw.rcfilters.dm.FilterGroup.prototype.isSticky = function () {
                return this.sticky;
        };
+
+       /**
+        * Check whether the group value is excluded from saved queries
+        *
+        * @return {boolean} Group value is excluded from saved queries
+        */
+       mw.rcfilters.dm.FilterGroup.prototype.isExcludedFromSavedQueries = function () {
+               return this.excludedFromSavedQueries;
+       };
 }( mediaWiki ) );
index 52c5bb0..cf226da 100644 (file)
                return result;
        };
 
+       /**
+        * Get a filter representation of all parameters that are marked
+        * as being excluded from saved query.
+        *
+        * @return {Object} Excluded filters values
+        */
+       mw.rcfilters.dm.FiltersViewModel.prototype.getExcludedFiltersState = function () {
+               var result = {};
+
+               $.each( this.groups, function ( name, model ) {
+                       if ( model.isExcludedFromSavedQueries() ) {
+                               $.extend( true, result, model.getSelectedState() );
+                       }
+               } );
+
+               return result;
+       };
+
        /**
         * Analyze the groups and their filters and output an object representing
         * the state of the parameters they represent.
index e9981bd..f0e3bd0 100644 (file)
                                        // we should remove all sticky behavior methods completely
                                        // See T172156
                                        // isSticky: true,
+                                       excludedFromSavedQueries: true,
                                        filters: displayConfig.limitArray.map( function ( num ) {
                                                return controller._createFilterDataFromNumber( num, num );
                                        } )
                                        'default': mw.user.options.get( 'rcdays', '30' ),
                                        // Temporarily making this not sticky while limit is not sticky, see above
                                        // isSticky: true,
+                                       excludedFromSavedQueries: true,
                                        filters: [
                                                // Hours (1, 2, 6, 12)
                                                0.04166, 0.0833, 0.25, 0.5
                this.savedQueriesModel.initialize(
                        parsedSavedQueries,
                        this._getBaseFilterState(),
-                       // This is for backwards compatibility - delete all sticky filter states
-                       Object.keys( this.filtersModel.getStickyFiltersState() )
+                       // This is for backwards compatibility - delete all excluded filter states
+                       Object.keys( this.filtersModel.getExcludedFiltersState() )
                );
 
                // Check whether we need to load defaults.
         * @private
         */
        mw.rcfilters.Controller.prototype._shouldCheckForNewChanges = function () {
-               var liveUpdateFeatureFlag = mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ||
-                       new mw.Uri().query.liveupdate;
-
                return !document.hidden &&
                        !this.filtersModel.hasConflict() &&
                        !this.changesListModel.getNewChangesExist() &&
                        !this.updatingChangesList &&
-                       liveUpdateFeatureFlag;
+                       mw.rcfilters.featureFlags.liveUpdate;
        };
 
        /**
                // These are filter states; highlight is stored as boolean
                highlightedItems.highlight = this.filtersModel.isHighlightEnabled();
 
-               // Delete all sticky filters
-               this._deleteStickyValuesFromFilterState( selectedState );
+               // Delete all excluded filters
+               this._deleteExcludedValuesFromFilterState( selectedState );
 
                // Add item
                queryID = this.savedQueriesModel.addNewQuery(
 
                        // Update model state from filters
                        this.filtersModel.toggleFiltersSelected(
-                               // Merge filters with sticky values
-                               $.extend( true, {}, data.filters, this.filtersModel.getStickyFiltersState() )
+                               // Merge filters with excluded values
+                               $.extend( true, {}, data.filters, this.filtersModel.getExcludedFiltersState() )
                        );
 
                        // Update namespace inverted property
                } );
                highlightedItems.highlight = this.filtersModel.isHighlightEnabled();
 
-               // Remove sticky filters
-               this._deleteStickyValuesFromFilterState( selectedState );
+               // Remove anything that should be excluded from the saved query
+               // this includes sticky filters and filters marked with 'excludedFromSavedQueries'
+               this._deleteExcludedValuesFromFilterState( selectedState );
 
                return this.savedQueriesModel.findMatchingQuery(
                        {
         *
         * @param {Object} filterState Filter state
         */
-       mw.rcfilters.Controller.prototype._deleteStickyValuesFromFilterState = function ( filterState ) {
-               // Remove sticky filters
-               $.each( this.filtersModel.getStickyFiltersState(), function ( filterName ) {
+       mw.rcfilters.Controller.prototype._deleteExcludedValuesFromFilterState = function ( filterState ) {
+               // Remove excluded filters
+               $.each( this.filtersModel.getExcludedFiltersState(), function ( filterName ) {
                        delete filterState[ filterName ];
                } );
        };
index c62d6f2..7bdc2a2 100644 (file)
@@ -44,6 +44,9 @@
 
                                return result;
                        }
+               },
+               featureFlags: {
+                       liveUpdate: mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) || new mw.Uri().query.liveupdate
                }
        };
 }( mediaWiki ) );
index 44d4459..8f8ca38 100644 (file)
                                .append( this.savedLinksListWidget.$element )
                );
 
-               if (
-                       mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ||
-                       // Allow users to enable live update with ?liveupdate=1
-                       new mw.Uri().query.liveupdate
-               ) {
+               if ( mw.rcfilters.featureFlags.liveUpdate ) {
                        $bottom.append( this.liveUpdateButton.$element );
                }
 
index 7f7bbd2..82992fb 100644 (file)
                        this.$element.find( 'br' ).detach();
                }
 
-               this.$element.find(
-                       'legend, .rclistfrom, .rcnotefrom, .rcoptions-listfromreset'
-               ).detach();
+               if ( mw.rcfilters.featureFlags.liveUpdate ) {
+                       this.$element.find(
+                               'legend, .rclistfrom, .rcnotefrom, .rcoptions-listfromreset'
+                       ).detach();
+               }
 
                if ( this.$element.text().trim() === '' ) {
                        this.$element.detach();