Implement temporary rollback confirmation toggle
[lhc/web/wiklou.git] / includes / actions / RollbackAction.php
index e2fc265..0e86fda 100644 (file)
@@ -73,12 +73,20 @@ class RollbackAction extends FormAction {
        }
 
        /**
+        * @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 {