From: Bill Pirkle Date: Thu, 20 Sep 2018 14:54:06 +0000 (-0500) Subject: Logging related to WikiExport cleanup and changes in T203424 X-Git-Tag: 1.34.0-rc.0~3986^2 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=75924318099ba38b8a159ff8483ccca460fc25d9 Logging related to WikiExport cleanup and changes in T203424 T203424 (Replace the WikiExporter backup dump streaming mode with batched queries) removed some outdated database usage techniques. While making these changes, we saw some potential cleanup opportunities related to the $history parameter to WikiExporter. Additional logging will inform whether we can do the additional cleanup. If so, it can be performed under a separate task. Bug: T203424 Change-Id: Ic4cef23520795665c89e03f325b891346d1340a9 --- diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index be79cae68c..3a7e9cdf9d 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -24,6 +24,7 @@ */ use MediaWiki\MediaWikiServices; +use MediaWiki\Logger\LoggerFactory; /** * A special page that allows users to export pages in a XML file @@ -98,6 +99,15 @@ class SpecialExport extends SpecialPage { $page = ''; $history = ''; } elseif ( $request->wasPosted() && $par == '' ) { + // Log to see if certain parameters are actually used. + // If not, we could deprecate them and do some cleanup, here and in WikiExporter. + LoggerFactory::getInstance( 'export' )->debug( + 'Special:Export POST, dir: [{dir}], offset: [{offset}], limit: [{limit}]', [ + 'dir' => $request->getRawVal( 'dir' ), + 'offset' => $request->getRawVal( 'offset' ), + 'limit' => $request->getRawVal( 'limit' ), + ] ); + $page = $request->getText( 'pages' ); $this->curonly = $request->getCheck( 'curonly' ); $rawOffset = $request->getVal( 'offset' );