Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / maintenance / dumpTextPass.php
index d0bda4e..5d92eec 100644 (file)
@@ -27,6 +27,8 @@
 require_once __DIR__ . '/backup.inc';
 require_once __DIR__ . '/../includes/export/WikiExporter.php';
 
+use Wikimedia\Rdbms\LoadBalancer;
+
 /**
  * @ingroup Maintenance
  */
@@ -86,7 +88,7 @@ class TextPassDumper extends BackupDumper {
        protected $checkpointFiles = [];
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $db;
 
@@ -212,7 +214,6 @@ TEXT
                // We do /not/ retry upon failure, but delegate to encapsulating logic, to avoid
                // individually retrying at different layers of code.
 
-               // 1. The LoadBalancer.
                try {
                        $this->lb = wfGetLBFactory()->newMainLB();
                } catch ( Exception $e ) {
@@ -220,7 +221,6 @@ TEXT
                                . " rotating DB failed to obtain new load balancer (" . $e->getMessage() . ")" );
                }
 
-               // 2. The Connection, through the load balancer.
                try {
                        $this->db = $this->lb->getConnection( DB_REPLICA, 'dump' );
                } catch ( Exception $e ) {