Followup r60051, with the rest of the callers and removing a useless subclassing...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 14 Dec 2009 23:18:03 +0000 (23:18 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 14 Dec 2009 23:18:03 +0000 (23:18 +0000)
includes/db/DatabaseMssql.php
maintenance/addwiki.php
maintenance/cleanupSpam.php
maintenance/deleteBatch.php
maintenance/deleteOrphanedRevisions.php
maintenance/moveBatch.php
maintenance/reassignEdits.php
maintenance/refreshLinks.php
maintenance/removeUnusedAccounts.php
maintenance/renamewiki.php
maintenance/updateSpecialPages.php

index 902eb77..e81c8ad 100644 (file)
@@ -842,22 +842,6 @@ class DatabaseMssql extends DatabaseBase {
                return $this->lastErrno() == 1205;
        }
 
-       /**
-        * Begin a transaction, committing any previously open transaction
-        * @deprecated use begin()
-        */
-       function immediateBegin( $fname = 'Database::immediateBegin' ) {
-               $this->begin();
-       }
-
-       /**
-        * Commit transaction, if one is open
-        * @deprecated use commit()
-        */
-       function immediateCommit( $fname = 'Database::immediateCommit' ) {
-               $this->commit();
-       }
-
        /**
         * Return MW-style timestamp used for MySQL schema
         */
index 29853f1..37140c6 100644 (file)
@@ -118,7 +118,7 @@ class AddWiki extends Maintenance {
                                $blobsFile = popen( $sedCmd, 'r' );
                                $extdb->sourceStream( $blobsFile );
                                pclose( $blobsFile );
-                               $extdb->immediateCommit();
+                               $extdb->commit();
                        }
                }
 
index d1927f9..e78ffe4 100644 (file)
@@ -109,7 +109,7 @@ class CleanupSpam extends Maintenance {
                        $this->output( "False match\n" );
                } else {
                        $dbw = wfGetDB( DB_MASTER );
-                       $dbw->immediateBegin();
+                       $dbw->begin();
                        if ( !$rev ) {
                                // Didn't find a non-spammy revision, blank the page
                                $this->output( "blanking\n" );
@@ -123,7 +123,7 @@ class CleanupSpam extends Maintenance {
                                $article = new Article( $title );
                                $article->updateArticle( $rev->getText(), wfMsg( 'spam_reverting', $domain ), false, false );
                        }
-                       $dbw->immediateCommit();
+                       $dbw->commit();
                        wfDoUpdates();
                }
        }
index 6946b0c..56afd86 100644 (file)
@@ -93,7 +93,7 @@ class DeleteBatch extends Maintenance {
                                $art = new Article( $page );
                        }
                        $success = $art->doDeleteArticle( $reason );
-                       $dbw->immediateCommit();
+                       $dbw->commit();
                        if ( $success ) {
                                $this->output( "\n" );
                        } else {
index 45e42a2..1146bef 100644 (file)
@@ -39,7 +39,7 @@ class DeleteOrphanedRevisions extends Maintenance {
                $report = $this->hasOption('report');
 
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->immediateBegin();
+               $dbw->begin();
                list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' );
 
                # Find all the orphaned revisions
@@ -57,7 +57,7 @@ class DeleteOrphanedRevisions extends Maintenance {
        
                # Nothing to do?
                if( $report || $count == 0 ) {
-                       $dbw->immediateCommit();
+                       $dbw->commit();
                        exit(0);
                }
        
@@ -67,7 +67,7 @@ class DeleteOrphanedRevisions extends Maintenance {
                $this->output( "done.\n" );
        
                # Close the transaction and call the script to purge unused text records
-               $dbw->immediateCommit();
+               $dbw->commit();
                $this->purgeRedundantText( true );
        }
        
index 9f23677..bd4ef7b 100644 (file)
@@ -94,7 +94,7 @@ class MoveBatch extends Maintenance {
                        if( $err !== true ) {
                                $this->output( "\nFAILED: $err" );
                        }
-                       $dbw->immediateCommit();
+                       $dbw->commit();
                        $this->output( "\n" );
        
                        if ( $interval ) {
index 296e7e1..e595e5b 100644 (file)
@@ -67,7 +67,7 @@ class ReassignEdits extends Maintenance {
         */
        private function doReassignEdits( &$from, &$to, $rc = false, $report = false ) {
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->immediateBegin();
+               $dbw->begin();
 
                # Count things
                $this->output( "Checking current edits..." );
@@ -113,7 +113,7 @@ class ReassignEdits extends Maintenance {
                        }       
                }
        
-               $dbw->immediateCommit();
+               $dbw->commit();
                return (int)$total;     
        }
        
index c75554e..6dccefb 100644 (file)
@@ -203,7 +203,7 @@ class RefreshLinks extends Maintenance {
                $parserOutput = $wgParser->parse( $revision->getText(), $wgTitle, $options, true, true, $revision->getId() );
                $update = new LinksUpdate( $wgTitle, $parserOutput, false );
                $update->doUpdate();
-               $dbw->immediateCommit();
+               $dbw->commit();
        }
 
        /*
index a417eba..7b0535b 100644 (file)
@@ -95,12 +95,12 @@ class RemoveUnusedAccounts extends Maintenance {
                                                 'image' => 'img', 'oldimage' => 'oi' );
                $count = 0;
        
-               $dbo->immediateBegin();
+               $dbo->begin();
                foreach( $checks as $table => $fprefix ) {
                        $conds = array( $fprefix . '_user' => $id );
                        $count += (int)$dbo->selectField( $table, 'COUNT(*)', $conds, __METHOD__ );
                }
-               $dbo->immediateCommit();
+               $dbo->commit();
        
                return $count == 0;
        }
index c12a25f..5751aea 100644 (file)
@@ -78,7 +78,7 @@ class RenameWiki extends Maintenance {
                                $extdb->query( "ALTER TABLE {$from}.blobs RENAME TO {$to}.blobs" );
                                $extdb->selectDB( $from );
                                $extdb->sourceFile( $this->getDir() . '/storage/blobs.sql' );
-                               $extdb->immediateCommit();
+                               $extdb->commit();
                        }
                }
                $this->output( "done.\n" );
index 8e5e45d..aaad371 100644 (file)
@@ -122,7 +122,7 @@ class UpdateSpecialPages extends Maintenance {
                                                $this->output( "Reconnected\n\n" );
                                        } else {
                                                # Commit the results
-                                               $dbw->immediateCommit();
+                                               $dbw->commit();
                                        }
                                        # Wait for the slave to catch up
                                        wfWaitForSlaves( 5 );