X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialExport.php;h=bf535a6f3ae7fc652e64d89aed8329bf815a747e;hp=3e66ab08d37887b40abc6a15000ca3f16217c3cd;hb=ce079cf6ad79ca8d3360817f809b219d166f9153;hpb=432e10528feab333002f7c7c37f9582a197d8b66 diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 3e66ab08d3..bf535a6f3a 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -201,6 +201,7 @@ class SpecialExport extends SpecialPage { 'buttontype' => 'submit', 'buttonname' => 'addcat', 'buttondefault' => $this->msg( 'export-addcat' )->text(), + 'hide-if' => [ '===', 'exportall', '1' ], ], ]; if ( $config->get( 'ExportFromNamespaces' ) ) { @@ -216,6 +217,7 @@ class SpecialExport extends SpecialPage { 'buttontype' => 'submit', 'buttonname' => 'addns', 'buttondefault' => $this->msg( 'export-addns' )->text(), + 'hide-if' => [ '===', 'exportall', '1' ], ], ]; } @@ -240,6 +242,7 @@ class SpecialExport extends SpecialPage { 'nodata' => true, 'rows' => 10, 'default' => $page, + 'hide-if' => [ '===', 'exportall', '1' ], ], ]; @@ -367,12 +370,12 @@ class SpecialExport extends SpecialPage { /* Ok, let's get to it... */ if ( $history == WikiExporter::CURRENT ) { $lb = false; - $db = wfGetDB( DB_SLAVE ); + $db = wfGetDB( DB_REPLICA ); $buffer = WikiExporter::BUFFER; } else { // Use an unbuffered query; histories may be very long! $lb = wfGetLBFactory()->newMainLB(); - $db = $lb->getConnection( DB_SLAVE ); + $db = $lb->getConnection( DB_REPLICA ); $buffer = WikiExporter::STREAM; // This might take a while... :D @@ -423,7 +426,7 @@ class SpecialExport extends SpecialPage { $name = $title->getDBkey(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( [ 'page', 'categorylinks' ], [ 'page_namespace', 'page_title' ], @@ -456,7 +459,7 @@ class SpecialExport extends SpecialPage { $maxPages = $this->getConfig()->get( 'ExportPagelistLimit' ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'page', [ 'page_namespace', 'page_title' ], @@ -553,7 +556,7 @@ class SpecialExport extends SpecialPage { * @return array */ private function getLinks( $inputPages, $pageSet, $table, $fields, $join ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); foreach ( $inputPages as $page ) { $title = Title::newFromText( $page );