if(!empty($retval))
// We don't care about multiple errors, just report one of them
$this->dieUsageMsg($retval);
- $this->getMain()->scheduleCommit();
$res['user'] = $params['user'];
$res['userID'] = $userID;
$articleObj->doWatch();
else if($params['unwatch'])
$articleObj->doUnwatch();
- $this->getMain()->scheduleCommit();
$r = array('title' => $titleObj->getPrefixedText(), 'reason' => $reason);
$this->getResult()->addValue(null, $this->getModuleName(), $r);
}
global $wgTitle;
$wgTitle = null;
$retval = $ep->internalAttemptSave($result, $wgUser->isAllowed('bot') && $params['bot']);
- $this->getMain()->scheduleCommit();
switch($retval)
{
case EditPage::AS_HOOK_ERROR:
'dbgfm' => 'ApiFormatDbg'
);
- private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames, $mCommit;
+ private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames;
private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage;
/**
return new $this->mFormats[$format] ($this, $format);
}
- /**
- * Schedule a database commit
- * @deprecated
- */
- public function scheduleCommit() {}
-
/**
* Execute api request. Any errors will be handled if the API was called by the remote client.
*/
$wgUser->removeWatch($fromTitle);
$wgUser->removeWatch($toTitle);
}
- $this->getMain()->scheduleCommit();
$this->getResult()->addValue(null, $this->getModuleName(), $r);
}
$this->mRedirectTitles[$title->getPrefixedText()] = $rt->getPrefixedText();
unset($this->mPendingRedirectIDs[$id]);
}
- $this->getMain()->scheduleCommit();
}
return $lb;
}
// This is very weird. Maybe the article was deleted or the user was blocked/desysopped in the meantime?
// Just throw an unknown error in this case, as it's very likely to be a race condition
$this->dieUsageMsg(array());
- $this->getMain()->scheduleCommit();
$res = array('title' => $titleObj->getPrefixedText(), 'reason' => $params['reason']);
if($expiry == Block::infinity())
$res['expiry'] = 'infinity';
// We don't care about multiple errors, just report one of them
$this->dieUsageMsg(current($retval));
- $this->getMain()->scheduleCommit();
$current = $target = $summary = NULL;
extract($details);
if(!empty($retval))
$this->dieUsageMsg($retval);
- $this->getMain()->scheduleCommit();
$res['id'] = $id;
$res['user'] = $user;
$res['reason'] = $reason;
if(!is_array($retval))
$this->dieUsageMsg(array('cannotundelete'));
- $this->getMain()->scheduleCommit();
$info['title'] = $titleObj->getPrefixedText();
$info['revisions'] = $retval[0];
$info['fileversions'] = $retval[1];