X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiImport.php;h=b36045e1f4cd18ba4895d7a2c075ddab4ee0a46b;hp=a0f0a8dbdb101ea492ab4884a7800376d5e94a78;hb=3f16fda078025ccf2716f0a6bf10a650244c9d89;hpb=b063a5bce2fd8e97e11fc1359d4e624d3fa5f480 diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index a0f0a8dbdb..b36045e1f4 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -1,9 +1,5 @@ .@gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -185,42 +181,3 @@ class ApiImport extends ApiBase { return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Import'; } } - -/** - * Import reporter for the API - * @ingroup API - */ -class ApiImportReporter extends ImportReporter { - private $mResultArr = []; - - /** - * @param Title $title - * @param Title $origTitle - * @param int $revisionCount - * @param int $successCount - * @param array $pageInfo - * @return void - */ - public function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) { - // Add a result entry - $r = []; - - if ( $title === null ) { - # Invalid or non-importable title - $r['title'] = $pageInfo['title']; - $r['invalid'] = true; - } else { - ApiQueryBase::addTitleInfo( $r, $title ); - $r['revisions'] = intval( $successCount ); - } - - $this->mResultArr[] = $r; - - // Piggyback on the parent to do the logging - parent::reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ); - } - - public function getData() { - return $this->mResultArr; - } -}