X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=blobdiff_plain;f=maintenance%2Fsql.php;h=58472e9bdf968fdfe45d671b8e5524bc062c7f4c;hb=4c122c850dc6972677db50b2221846850ce2dc56;hp=cc976ed97fb84792ddc93e0fe24c5358e9697882;hpb=a946285e4d1b40ddb9374ae791a4aeb159eb7bb1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sql.php b/maintenance/sql.php index cc976ed97f..58472e9bdf 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -24,6 +24,8 @@ require_once __DIR__ . '/Maintenance.php'; +use Wikimedia\Rdbms\ResultWrapper; + /** * Maintenance script that sends SQL queries from the specified file to the database. * @@ -50,7 +52,7 @@ class MwSql extends Maintenance { $wiki = $this->hasOption( 'wikidb' ) ? $this->getOption( 'wikidb' ) : false; // Get the appropriate load balancer (for this wiki) if ( $this->hasOption( 'cluster' ) ) { - $lb = wfGetLBFactory()->getExternalLB( $this->getOption( 'cluster' ), $wiki ); + $lb = wfGetLBFactory()->getExternalLB( $this->getOption( 'cluster' ) ); } else { $lb = wfGetLB( $wiki ); } @@ -137,7 +139,7 @@ class MwSql extends Maintenance { } if ( $historyFile ) { # Delimiter is eated by streamStatementEnd, we add it - # up in the history (bug 37020) + # up in the history (T39020) readline_add_history( $wholeLine . ';' ); readline_write_history( $historyFile ); } @@ -159,7 +161,7 @@ class MwSql extends Maintenance { /** * Print the results, callback for $db->sourceStream() - * @param ResultWrapper $res The results object + * @param ResultWrapper|bool $res The results object * @param IDatabase $db */ public function sqlPrintResult( $res, $db ) {