From: Roan Kattouw Date: Wed, 2 Apr 2008 18:04:54 +0000 (+0000) Subject: (bug 13587) Execute deferred updates in api.php X-Git-Tag: 1.31.0-rc.0~48658 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=1fee715ceab01292a44dd1ff140721dad9c5efb2;p=lhc%2Fweb%2Fwiklou.git (bug 13587) Execute deferred updates in api.php --- diff --git a/api.php b/api.php index ce445ef4aa..1a443317b6 100644 --- a/api.php +++ b/api.php @@ -76,6 +76,11 @@ $processor = new ApiMain($wgRequest, $wgEnableWriteAPI); // Process data & print results $processor->execute(); +// Execute any deferred updates +$mediawiki = new MediaWiki(); +$mediawiki->doUpdates($wgDeferredUpdateList); +$mediawiki->doUpdates($wgPostCommitUpdateList); + // Log what the user did, for book-keeping purposes. wfProfileOut('api.php'); wfLogProfilingData(); diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index dde5a1b2ea..8d62a44bc5 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -148,7 +148,6 @@ class ApiEditPage extends ApiBase { $wgTitle = null; $dbw = wfGetDb(DB_MASTER); $retval = $ep->internalAttemptSave($result, $wgUser->isAllowed('bot') && $params['bot']); - $dbw->commit(); switch($retval) { case EditPage::AS_HOOK_ERROR: