*/
$wgElementTiming = false;
+/**
+ * Temporary option to show rollback confirmation user settings
+ * without activating the feature itself
+ * @see T217039
+ * @since 1.33
+ * @deprecated 1.33
+ * @var bool
+ */
+$wgDisableRollbackConfirmationFeature = false;
+
/**
* For really cool vim folding this needs to be at the end:
* vim: foldmarker=@{,@} foldmethod=marker
$inner = $context->msg( 'brackets' )->rawParams( $inner )->escaped();
}
- if ( $context->getUser()->getBoolOption( 'showrollbackconfirmation' ) ) {
+ /**
+ * FIXME
+ * Remove all references to DisableRollbackConfirmationFeature
+ * after release of rollback feature. See T199534
+ */
+ if ( !MediaWikiServices::getInstance()
+ ->getMainConfig()->get( 'DisableRollbackConfirmationFeature' ) &&
+ $context->getUser()->getBoolOption( 'showrollbackconfirmation' )
+ ) {
$stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
$stats->increment( 'rollbackconfirmation.event.load' );
$context->getOutput()->addModules( 'mediawiki.page.rollback.confirmation' );
}
/**
+ * @throws ConfigException
* @throws ErrorPageError
* @throws ReadOnlyError
* @throws ThrottledError
*/
public function show() {
- if ( $this->getUser()->getOption( 'showrollbackconfirmation' ) == false ||
+ /**
+ * FIXME
+ * Remove temporary check of DisableRollbackConfirmationFeature
+ * after release of rollback feature. See T199534
+ */
+ $config = \MediaWiki\MediaWikiServices::getInstance()->getMainConfig();
+ if ( $config->get( 'DisableRollbackConfirmationFeature' ) == true ||
+ $this->getUser()->getOption( 'showrollbackconfirmation' ) == false ||
$this->getRequest()->wasPosted() ) {
$this->handleRollbackRequest();
} else {
'section' => 'rendering/advancedrendering',
'label-message' => 'tog-showrollbackconfirmation',
];
+
+ /**
+ * FIXME
+ * Remove temporary help text and references to DisableRollbackConfirmationFeature
+ * after release of rollback feature. See T199534
+ */
+ if ( MediaWikiServices::getInstance()
+ ->getMainConfig()->get( 'DisableRollbackConfirmationFeature' ) ) {
+ $defaultPreferences['showrollbackconfirmation']
+ ['help-message'] = 'tog-showrollbackconfirmation-prerelease-warning';
+ }
}
}
"tog-useeditwarning": "Warn me when I leave an edit page with unsaved changes",
"tog-prefershttps": "Always use a secure connection while logged in",
"tog-showrollbackconfirmation": "Show a confirmation prompt when clicking on a rollback link",
+ "tog-showrollbackconfirmation-prerelease-warning": "Please note: This feature is not available yet. If you set this preference now, your choice will be remembered [https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/Rollback#Status when the feature is released].",
"underline-always": "Always",
"underline-never": "Never",
"underline-default": "Skin or browser default",
"tog-useeditwarning": "Used as label for the checkbox in [[Special:Preferences#mw-prefsection-editing|Special:Preferences]].",
"tog-prefershttps": "Toggle option used in [[Special:Preferences]] that indicates if the user wants to use a secure connection when logged in",
"tog-showrollbackconfirmation": "Toggle option used in [[Special:Preferences]] to enable/disable rollback confirmation prompt. Should be visible only to users with rollback rights.",
+ "tog-showrollbackconfirmation-prerelease-warning": "Notice for wikis where the option can be set before the feature is enabled.\n\nNote: This notice is temporary and will only appear before the rollback confirmation feature is released.",
"underline-always": "Used in [[Special:Preferences#mw-prefsection-rendering|Preferences]].\n\nThis option means \"always underline links\", there are also options {{msg-mw|Underline-never}} and {{msg-mw|Underline-default}}.\n\n{{Gender}}\n{{Identical|Always}}",
"underline-never": "Used in [[Special:Preferences#mw-prefsection-rendering|Preferences]].\n\nThis option means \"never underline links\", there are also options {{msg-mw|Underline-always}} and {{msg-mw|Underline-default}}.\n\n{{Gender}}\n{{Identical|Never}}",
"underline-default": "Used in [[Special:Preferences#mw-prefsection-rendering|Preferences]].\n\nThis option means \"underline links as in your user skin or your browser\", there are also options {{msg-mw|Underline-never}} and {{msg-mw|Underline-always}}.\n\n{{Gender}}\n{{Identical|Browser default}}",