Page MenuHomePhabricator
Paste P4150

Masterwork From Distant Lands
ActivePublic

Authored by Mattflaschen-WMF on Oct 4 2016, 4:45 AM.
Tags
None
Referenced Files
F4553756: Masterwork From Distant Lands
Oct 4 2016, 4:45 AM
Subscribers
None
mwrepl testwiki
b FlowHooks::onUserSaveOptions()
---
define( 'MW_API', true ); // Signal this is api.php.
$wgUser = User::newFromName( 'Test 2016-10-03 optin 10' );
$wgTitle = Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title in manual testing' );
$token = $wgUser->getEditToken( '', $wgRequest ); // Although write actions will result in strange logs
$params = [ 'action' => 'options', 'token' => $token, 'change' => BETA_FEATURE_FLOW_USER_TALK_PAGE . '=0' ];
$request = new DerivativeRequest( $wgRequest, $params, /* $wasPosted = */ true );
$request->setIP( '127.0.0.1' ); // An IP must be set
$context = RequestContext::getMain();
$context->setUser( $wgUser );
$context->setTitle( $wgTitle );
$context->setRequest( $request );
$main = new ApiMain( $context, true );
wfRunHooks( 'ApiBeforeMain', array( &$main ) ); // For CirrusSearch and other extensions
b FlowHooks::onTitleMoveStarting()
b FlowHooks::onTitleMoveCompleting()
b Database::startAtomic()
b Database::begin()
b Database::doBegin()
b Database::commit()
b Database::doCommit()
b Database::endAtomic()
b Database::rollback()
b Database::doRollback()
b Flow\Import\OptInController::disable()
$main->execute();
// Examine $main->getResult()->getResultData() or whatever else you need to do

Event Timeline

Mattflaschen-WMF changed the title of this paste from untitled to Masterwork From Distant Lands.
Mattflaschen-WMF updated the paste's language from autodetect to autodetect.