* 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 = [];
* 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().
*/
. parent::getScript( $context );
}
+ /**
+ * @inheritdoc
+ */
+ public function supportsURLLoading() {
+ return false;
+ }
+
/**
* @inheritdoc
*/
'value' => 'p1.page_title',
'rd_namespace',
'rd_title',
+ 'rd_fragment',
],
'conds' => [
// Exclude pages that don't exist locally as wiki pages,
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 ) {
[ 'action' => 'edit' ]
);
}
- $to = $linkRenderer->makeBrokenLink( $toObj );
+ $to = $linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() );
$arr = $this->getLanguage()->getArrow();
$out = $from . $this->msg( 'word-separator' )->escaped();
$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' );
// 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' => [
}
$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,
[ 'redirect' => 'no' ]
);
- $linkC = $linkRenderer->makeKnownLink( $titleC );
+ $linkC = $linkRenderer->makeKnownLink( $titleC, $titleC->getFullText() );
$lang = $this->getLanguage();
$arr = $lang->getArrow() . $lang->getDirMark();
$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 ) ) {
# 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 {
* @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;
"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.",
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
*/
( function ( OO ) {
* 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;
* 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;
}
.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;
.oo-ui-dropdownInputWidget.oo-ui-widget-disabled select {
background-color: #eaecf0;
color: #72777d;
- border-color: #72777d;
+ border-color: #c8ccd1;
}
.oo-ui-radioInputWidget {
position: relative;
}
.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;
-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 {
.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 {
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
*/
( function ( OO ) {
* 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 {
* 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
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
*/
( function ( OO ) {
* 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;
* 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 {
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
*/
( function ( OO ) {
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
*/
( function ( OO ) {
* 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);
* 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
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-08-01T23:45:14Z
+ * Date: 2017-08-03T19:36:51Z
*/
( function ( OO ) {
* 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
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 ) );
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.
// 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 ];
} );
};
return result;
}
+ },
+ featureFlags: {
+ liveUpdate: mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) || new mw.Uri().query.liveupdate
}
};
}( mediaWiki ) );
.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 );
}
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();