X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialExport.php;h=f5e9e49b6985da8f43e525ac2ec7cfd9efdccfe9;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hp=bf535a6f3ae7fc652e64d89aed8329bf815a747e;hpb=f9676b19503a72e70783966c5f748ef61277849b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index bf535a6f3a..8e6c446238 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -23,6 +23,8 @@ * @ingroup SpecialPage */ +use Mediawiki\MediaWikiServices; + /** * A special page that allows users to export pages in a XML file * @@ -286,7 +288,7 @@ class SpecialExport extends SpecialPage { $formDescriptor += [ 'wpDownload' => [ 'type' => 'check', - 'name' =>'wpDownload', + 'name' => 'wpDownload', 'id' => 'wpDownload', 'default' => $request->wasPosted() ? $request->getCheck( 'wpDownload' ) : true, 'label-message' => 'export-download', @@ -328,7 +330,6 @@ class SpecialExport extends SpecialPage { * @param bool $exportall Whether to export everything */ private function doExport( $page, $history, $list_authors, $exportall ) { - // If we are grabbing everything, enable full history and ignore the rest if ( $exportall ) { $history = WikiExporter::FULL; @@ -359,7 +360,7 @@ class SpecialExport extends SpecialPage { $pages = array_keys( $pageSet ); - // Normalize titles to the same format and remove dupes, see bug 17374 + // Normalize titles to the same format and remove dupes, see T19374 foreach ( $pages as $k => $v ) { $pages[$k] = str_replace( " ", "_", $v ); } @@ -374,7 +375,7 @@ class SpecialExport extends SpecialPage { $buffer = WikiExporter::BUFFER; } else { // Use an unbuffered query; histories may be very long! - $lb = wfGetLBFactory()->newMainLB(); + $lb = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->newMainLB(); $db = $lb->getConnection( DB_REPLICA ); $buffer = WikiExporter::STREAM; @@ -392,7 +393,7 @@ class SpecialExport extends SpecialPage { $exporter->allPages(); } else { foreach ( $pages as $page ) { - # Bug 8824: Only export pages the user can read + # T10824: Only export pages the user can read $title = Title::newFromText( $page ); if ( is_null( $title ) ) { // @todo Perhaps output an tag or something.