X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfetchText.php;h=9dee6e530dbf69d5d104e4ddd39062141337fe4d;hb=531ed101ccd14dc7e2cf2858a67b2523ef6a79ff;hp=989e90aea3f329a9ece8fa56bf97c4dcc96ff5b1;hpb=00cef5ba5952d23e315f031a56c08855fd266b98;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php index 989e90aea3..9dee6e530d 100644 --- a/maintenance/fetchText.php +++ b/maintenance/fetchText.php @@ -49,7 +49,7 @@ class FetchText extends Maintenance { * note that the text string itself is *not* followed by newline */ public function execute() { - $db = $this->getDB( DB_SLAVE ); + $db = $this->getDB( DB_REPLICA ); $stdin = $this->getStdin(); while ( !feof( $stdin ) ) { $line = fgets( $stdin ); @@ -71,15 +71,15 @@ class FetchText extends Maintenance { /** * May throw a database error if, say, the server dies during query. - * @param DatabaseBase $db + * @param Database $db * @param int $id The old_id * @return string */ private function doGetText( $db, $id ) { $id = intval( $id ); $row = $db->selectRow( 'text', - array( 'old_text', 'old_flags' ), - array( 'old_id' => $id ), + [ 'old_text', 'old_flags' ], + [ 'old_id' => $id ], __METHOD__ ); $text = Revision::getRevisionText( $row ); if ( $text === false ) {