From 72b793a695283c8fbf239f8a67ee61e6097ceb1f Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 18 May 2008 20:15:56 +0000 Subject: [PATCH] Remove deprecated ApiMain::scheduleCommit() --- includes/api/ApiBlock.php | 1 - includes/api/ApiDelete.php | 1 - includes/api/ApiEditPage.php | 1 - includes/api/ApiMain.php | 8 +------- includes/api/ApiMove.php | 1 - includes/api/ApiPageSet.php | 1 - includes/api/ApiProtect.php | 1 - includes/api/ApiRollback.php | 1 - includes/api/ApiUnblock.php | 1 - includes/api/ApiUndelete.php | 1 - 10 files changed, 1 insertion(+), 16 deletions(-) diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index f2b72f2f2c..12f9025c01 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -91,7 +91,6 @@ class ApiBlock extends ApiBase { 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; diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index a3ca8dea0c..3fa5b022eb 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -76,7 +76,6 @@ class ApiDelete extends ApiBase { $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); } diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index ee7e542ba2..f69e721604 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -147,7 +147,6 @@ class ApiEditPage extends ApiBase { global $wgTitle; $wgTitle = null; $retval = $ep->internalAttemptSave($result, $wgUser->isAllowed('bot') && $params['bot']); - $this->getMain()->scheduleCommit(); switch($retval) { case EditPage::AS_HOOK_ERROR: diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 14ad68a575..e44a5f2235 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -95,7 +95,7 @@ class ApiMain extends ApiBase { 'dbgfm' => 'ApiFormatDbg' ); - private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames, $mCommit; + private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames; private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; /** @@ -197,12 +197,6 @@ class ApiMain extends ApiBase { 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. */ diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index b8fef55c57..60873a8494 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -116,7 +116,6 @@ class ApiMove extends ApiBase { $wgUser->removeWatch($fromTitle); $wgUser->removeWatch($toTitle); } - $this->getMain()->scheduleCommit(); $this->getResult()->addValue(null, $this->getModuleName(), $r); } diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 525d718a69..7ab1e7fbb7 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -552,7 +552,6 @@ class ApiPageSet extends ApiQueryBase { $this->mRedirectTitles[$title->getPrefixedText()] = $rt->getPrefixedText(); unset($this->mPendingRedirectIDs[$id]); } - $this->getMain()->scheduleCommit(); } return $lb; } diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index ee17debc43..eea45aa9bd 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -94,7 +94,6 @@ class ApiProtect extends ApiBase { // 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'; diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php index 6d72012fd5..a1a898b59f 100644 --- a/includes/api/ApiRollback.php +++ b/includes/api/ApiRollback.php @@ -68,7 +68,6 @@ class ApiRollback extends ApiBase { // 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); diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index f0a26a1256..9f707822e9 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -74,7 +74,6 @@ class ApiUnblock extends ApiBase { if(!empty($retval)) $this->dieUsageMsg($retval); - $this->getMain()->scheduleCommit(); $res['id'] = $id; $res['user'] = $user; $res['reason'] = $reason; diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php index d22523245c..58860bd587 100644 --- a/includes/api/ApiUndelete.php +++ b/includes/api/ApiUndelete.php @@ -73,7 +73,6 @@ class ApiUndelete extends ApiBase { if(!is_array($retval)) $this->dieUsageMsg(array('cannotundelete')); - $this->getMain()->scheduleCommit(); $info['title'] = $titleObj->getPrefixedText(); $info['revisions'] = $retval[0]; $info['fileversions'] = $retval[1]; -- 2.20.1