Remove deprecated ApiMain::scheduleCommit()
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 18 May 2008 20:15:56 +0000 (20:15 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 18 May 2008 20:15:56 +0000 (20:15 +0000)
includes/api/ApiBlock.php
includes/api/ApiDelete.php
includes/api/ApiEditPage.php
includes/api/ApiMain.php
includes/api/ApiMove.php
includes/api/ApiPageSet.php
includes/api/ApiProtect.php
includes/api/ApiRollback.php
includes/api/ApiUnblock.php
includes/api/ApiUndelete.php

index f2b72f2..12f9025 100644 (file)
@@ -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;
index a3ca8de..3fa5b02 100644 (file)
@@ -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);
        }
index ee7e542..f69e721 100644 (file)
@@ -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:
index 14ad68a..e44a5f2 100644 (file)
@@ -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.
         */
index b8fef55..60873a8 100644 (file)
@@ -116,7 +116,6 @@ class ApiMove extends ApiBase {
                        $wgUser->removeWatch($fromTitle);
                        $wgUser->removeWatch($toTitle);
                }
-               $this->getMain()->scheduleCommit();
                $this->getResult()->addValue(null, $this->getModuleName(), $r);
        }
 
index 525d718..7ab1e7f 100644 (file)
@@ -552,7 +552,6 @@ class ApiPageSet extends ApiQueryBase {
                                $this->mRedirectTitles[$title->getPrefixedText()] = $rt->getPrefixedText();
                                unset($this->mPendingRedirectIDs[$id]);
                        }
-                       $this->getMain()->scheduleCommit();
                }
                return $lb;
        }
index ee17deb..eea45aa 100644 (file)
@@ -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';
index 6d72012..a1a898b 100644 (file)
@@ -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);
 
index f0a26a1..9f70782 100644 (file)
@@ -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;
index d225232..58860bd 100644 (file)
@@ -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];