Add hook to allow extensions to modify the LonelyPages query
[lhc/web/wiklou.git] / maintenance / backupTextPass.inc
index c515c6f..f16772c 100644 (file)
@@ -82,7 +82,6 @@ class TextPassDumper extends BackupDumper {
         */
        protected $db;
 
-
        /**
         * Drop the database connection $this->db and try to get a new one.
         *
@@ -123,16 +122,14 @@ class TextPassDumper extends BackupDumper {
                        throw new MWException( __METHOD__ . " rotating DB failed to obtain new load balancer (" . $e->getMessage() . ")" );
                }
 
-
                // 2. The Connection, through the load balancer.
                try {
-                       $this->db = $this->lb->getConnection( DB_SLAVE, 'backup' );
+                       $this->db = $this->lb->getConnection( DB_SLAVE, 'dump' );
                } catch ( Exception $e ) {
                        throw new MWException( __METHOD__ . " rotating DB failed to obtain new database (" . $e->getMessage() . ")" );
                }
        }
 
-
        function initProgress( $history = WikiExporter::FULL ) {
                parent::initProgress();
                $this->timeOfCheckpoint = $this->startTime;
@@ -420,8 +417,8 @@ class TextPassDumper extends BackupDumper {
                $text = false; // The candidate for a good text. false if no proper value.
                $failures = 0; // The number of times, this invocation of getText already failed.
 
-               static $consecutiveFailedTextRetrievals = 0; // The number of times getText failed without
-                                                            // yielding a good text in between.
+               // The number of times getText failed without yielding a good text in between.
+               static $consecutiveFailedTextRetrievals = 0;
 
                $this->fetchCount++;
 
@@ -556,7 +553,6 @@ class TextPassDumper extends BackupDumper {
                return "";
        }
 
-
        /**
         * May throw a database error if, say, the server dies during query.
         * @param $id