* Constructing Parser directly is deprecated. Obtain one from ParserFactory.
* Title::moveSubpages is deprecated. Use MovePage::moveSubpages or
MovePage::moveSubpagesIfAllowed.
+* The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
+* (T62260) Hard deprecate Language::getExtraUserToggles() method.
+* …
=== Other changes in 1.34 ===
* …
* - Other softblocks are chosen over autoblocks
* - If there are multiple exact or range blocks at the same level, the one chosen
* is random
- * This should be used when $blocks where retrieved from the user's IP address
+ * This should be used when $blocks were retrieved from the user's IP address
* and $ipChain is populated from the same IP address information.
*
* @param array $blocks Array of Block objects
wfDebug( __METHOD__ . ': primary transaction round committed' );
// Run updates that need to block the user or affect output (this is the last chance)
- DeferredUpdates::doUpdates( 'enqueue', DeferredUpdates::PRESEND );
+ DeferredUpdates::doUpdates( 'run', DeferredUpdates::PRESEND );
wfDebug( __METHOD__ . ': pre-send deferred updates completed' );
// T214471: persist the session to avoid race conditions on subsequent requests
$request->getSession()->save();
];
$deferValues = [ false, DeferredUpdates::PRESEND, DeferredUpdates::POSTSEND ];
if ( !in_array( $options['defer'], $deferValues, true ) ) {
- throw new InvalidArgumentException( 'invalid value for defer: ' . $options['defer'] );
+ throw new InvalidArgumentException( 'Invalid value for defer: ' . $options['defer'] );
}
- Assert::parameterType( 'integer|null', $options['transactionTicket'],
- '$options[\'transactionTicket\']' );
+ Assert::parameterType(
+ 'integer|null', $options['transactionTicket'], '$options[\'transactionTicket\']' );
$updates = $this->getSecondaryDataUpdates( $options['recursive'] );
$causeAction = $this->options['causeAction'] ?? 'unknown';
$causeAgent = $this->options['causeAgent'] ?? 'unknown';
$legacyRevision = new Revision( $this->revision );
+ $ticket = $options['transactionTicket'];
- if ( $options['defer'] === false && $options['transactionTicket'] !== null ) {
+ if ( $options['defer'] === false && $ticket !== null ) {
// For legacy hook handlers doing updates via LinksUpdateConstructed, make sure
// any pending writes they made get flushed before the doUpdate() calls below.
// This avoids snapshot-clearing errors in LinksUpdate::acquirePageLock().
- $this->loadbalancerFactory->commitAndWaitForReplication(
- __METHOD__, $options['transactionTicket']
- );
+ $this->loadbalancerFactory->commitAndWaitForReplication( __METHOD__, $ticket );
}
foreach ( $updates as $update ) {
}
if ( $options['defer'] === false ) {
- if ( $update instanceof DataUpdate && $options['transactionTicket'] !== null ) {
- $update->setTransactionTicket( $options['transactionTicket'] );
+ if ( $update instanceof DataUpdate && $ticket !== null ) {
+ $update->setTransactionTicket( $ticket );
}
$update->doUpdate();
} else {
*/
public static $allKeys = [
'fallback', 'namespaceNames', 'bookstoreList',
- 'magicWords', 'messages', 'rtl', 'capitalizeAllNouns', 'digitTransformTable',
- 'separatorTransformTable', 'minimumGroupingDigits',
- 'fallback8bitEncoding', 'linkPrefixExtension',
- 'linkTrail', 'linkPrefixCharset', 'namespaceAliases',
- 'dateFormats', 'datePreferences', 'datePreferenceMigrationMap',
- 'defaultDateFormat', 'extraUserToggles', 'specialPageAliases',
- 'imageFiles', 'preloadedMessages', 'namespaceGenderAliases',
- 'digitGroupingPattern', 'pluralRules', 'pluralRuleTypes', 'compiledPluralRules',
+ 'magicWords', 'messages', 'rtl', 'capitalizeAllNouns',
+ 'digitTransformTable', 'separatorTransformTable',
+ 'minimumGroupingDigits', 'fallback8bitEncoding',
+ 'linkPrefixExtension', 'linkTrail', 'linkPrefixCharset',
+ 'namespaceAliases', 'dateFormats', 'datePreferences',
+ 'datePreferenceMigrationMap', 'defaultDateFormat',
+ 'specialPageAliases', 'imageFiles', 'preloadedMessages',
+ 'namespaceGenderAliases', 'digitGroupingPattern', 'pluralRules',
+ 'pluralRuleTypes', 'compiledPluralRules',
];
/**
/**
* Keys for items which are a numbered array.
*/
- public static $mergeableListKeys = [ 'extraUserToggles' ];
+ public static $mergeableListKeys = [];
/**
* Keys for items which contain an array of arrays of equivalent aliases
// Carry over cause so the update can do extra logging
'causeAction' => $this->params['causeAction'],
'causeAgent' => $this->params['causeAgent'],
- 'defer' => false,
- 'transactionTicket' => $ticket,
+ 'transactionTicket' => $ticket
];
if ( !empty( $this->params['triggeringUser'] ) ) {
$userInfo = $this->params['triggeringUser'];
}
}
- // Stuff from Language::getExtraUserToggles()
- // FIXME is this dead code? $extraUserToggles doesn't seem to be defined for any language
- $toggles = $this->contLang->getExtraUserToggles();
-
- foreach ( $toggles as $toggle ) {
- $defaultPreferences[$toggle] = [
- 'type' => 'toggle',
- 'section' => 'personal/i18n',
- 'label-message' => "tog-$toggle",
- ];
- }
-
// show a preview of the old signature first
$oldsigWikiText = MediaWikiServices::getInstance()->getParser()->preSaveTransform(
'~~~',
'md_skin' => $vary,
'md_deps' => $deps,
],
- [ 'md_module', 'md_skin' ],
+ [ [ 'md_module', 'md_skin' ] ],
[
'md_deps' => $deps,
],
$this->outputHeader();
$out = $this->getOutput();
$out->setPageTitle( $this->msg( 'ipblocklist' ) );
- $out->addModuleStyles( [ 'mediawiki.special', 'mediawiki.special.blocklist' ] );
+ $out->addModuleStyles( [ 'mediawiki.special' ] );
$request = $this->getRequest();
$par = $request->getVal( 'ip', $par );
* @return array
*/
public function getExtraUserToggles() {
- return (array)self::$dataCache->getItem( $this->mCode, 'extraUserToggles' );
+ wfDeprecated( __METHOD__, '1.34' );
+ return [];
}
/**
*/
$separatorTransformTable = null;
-/**
- * Extra user preferences, which will be shown in Special:Preferences as
- * checkboxes. Extra settings in derived languages will automatically be
- * appended to the array of the fallback languages.
- */
-$extraUserToggles = [];
-
/**
* URLs do not specify their encoding. UTF-8 is used by default, but if the
* URL is not a valid UTF-8 sequence, we have to try to guess what the real
'resources/src/mediawiki.special/userrights.css',
'resources/src/mediawiki.special/watchlist.css',
'resources/src/mediawiki.special/block.less',
+ 'resources/src/mediawiki.special/blocklist.less',
],
'targets' => [ 'desktop', 'mobile' ],
],
],
'targets' => [ 'desktop', 'mobile' ],
],
- 'mediawiki.special.blocklist' => [
- 'styles' => 'resources/src/mediawiki.special/blocklist.less',
- 'targets' => [ 'desktop', 'mobile' ],
- ],
'mediawiki.special.changecredentials.js' => [
'scripts' => 'resources/src/mediawiki.special.changecredentials.js',
'dependencies' => [