Merge "Make unused variable optional in ChangesList::insertDiffHist"
[lhc/web/wiklou.git] / includes / utils / BatchRowWriter.php
index 04c00a3..ffb7053 100644 (file)
@@ -22,7 +22,7 @@
  */
 class BatchRowWriter {
        /**
-        * @var DatabaseBase $db The database to write to
+        * @var IDatabase $db The database to write to
         */
        protected $db;
 
@@ -37,11 +37,11 @@ class BatchRowWriter {
        protected $clusterName;
 
        /**
-        * @param DatabaseBase $db          The database to write to
+        * @param IDatabase $db The database to write to
         * @param string       $table       The name of the table to update
         * @param string|bool  $clusterName A cluster name valid for use with LBFactory
         */
-       public function __construct( DatabaseBase $db, $table, $clusterName = false ) {
+       public function __construct( IDatabase $db, $table, $clusterName = false ) {
                $this->db = $db;
                $this->table = $table;
                $this->clusterName = $clusterName;
@@ -66,6 +66,6 @@ class BatchRowWriter {
                }
 
                $this->db->commit();
-               wfWaitForSlaves( false, false, $this->clusterName );
+               wfGetLBFactory()->waitForReplication();
        }
 }