}
}
+ // @TODO: remove this hack once rollback uses POST (T88044)
+ $trxLimits = $this->getConfig()->get( 'TrxProfilerLimits' );
+ $trxProfiler = Profiler::instance()->getTransactionProfiler();
+ $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ );
+ DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits ) {
+ $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], __METHOD__ );
+ } );
+
$retval = $pageObj->doRollback(
$this->getRbUser( $params ),
$summary,
$this->dieStatus( $this->errorArrayToStatus( $retval, $user ) );
}
- $watch = 'preferences';
- if ( isset( $params['watchlist'] ) ) {
- $watch = $params['watchlist'];
- }
+ $watch = $params['watchlist'] ?? 'preferences';
// Watch pages
$this->setWatch( $watch, $titleObj, 'watchrollback' );