* Fix unlogged automatic user creation: run wfLBFactory()->shutdown() unconditionally...
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 17 May 2008 04:26:26 +0000 (04:26 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 17 May 2008 04:26:26 +0000 (04:26 +0000)
* Fixed debugging code left in (mustBePosted disabled).

api.php
includes/api/ApiLogin.php
includes/api/ApiMain.php

diff --git a/api.php b/api.php
index b856708..77dc52a 100644 (file)
--- a/api.php
+++ b/api.php
@@ -83,3 +83,6 @@ wfDoUpdates();
 wfProfileOut('api.php');
 wfLogProfilingData();
 
+// Shut down the database
+wfGetLBFactory()->shutdown();
+
index 2b603b3..42d67a0 100644 (file)
@@ -223,7 +223,7 @@ class ApiLogin extends ApiBase {
                return wfMemcKey( 'apilogin', 'badlogin', 'ip', wfGetIP() );
        }
 
-       //public function mustBePosted() { return true; }
+       public function mustBePosted() { return true; }
 
        public function getAllowedParams() {
                return array (
index 49fe93a..14ad68a 100644 (file)
@@ -199,10 +199,9 @@ class ApiMain extends ApiBase {
 
        /**
         * Schedule a database commit
+        * @deprecated
         */
-       public function scheduleCommit() {
-               $this->mCommit = true;
-       }
+       public function scheduleCommit() {}
 
        /**
         * Execute api request. Any errors will be handled if the API was called by the remote client.
@@ -213,11 +212,7 @@ class ApiMain extends ApiBase {
                        $this->executeAction();
                else
                        $this->executeActionWithErrorHandling();
-               if($this->mCommit)
-               {
-                       $dbw = wfGetDb(DB_MASTER);
-                       $dbw->immediateCommit();
-               }
+       
                $this->profileOut();
        }