Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P4150
Masterwork From Distant Lands
Active
Public
Actions
Authored by
•
Mattflaschen-WMF
on Oct 4 2016, 4:45 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F4553756: Masterwork From Distant Lands
Oct 4 2016, 4:45 AM
2016-10-04 04:45:50 (UTC+0)
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
edited the content of this paste.
(Show Details)
Oct 4 2016, 4:45 AM
2016-10-04 04:45:50 (UTC+0)
•
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
.
•
Mattflaschen-WMF
mentioned this in
T138310: Flow as a Beta feature: enable, disable and reenable doesn't seem to work
.
Oct 4 2016, 4:53 AM
2016-10-04 04:53:30 (UTC+0)
Log In to Comment