X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialImport.php;h=beb454d669f899b6847dc702e35f3b39af620f19;hp=c58af603d2722f6184d86af735493bb3b12353e8;hb=fb79f30319b9ad2a7eb0f5f4d1668143ec8f963e;hpb=72b9240497311a2fa5f5b76d9e8bb953dc59853f diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index c58af603d2..beb454d669 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -24,6 +24,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * MediaWiki page data importer * @@ -44,9 +46,6 @@ class SpecialImport extends SpecialPage { private $pageLinkDepth; private $importSources; - /** - * Constructor - */ public function __construct() { parent::__construct( 'Import', 'import' ); } @@ -174,10 +173,8 @@ class SpecialImport extends SpecialPage { $out = $this->getOutput(); if ( !$source->isGood() ) { - $out->wrapWikiMsg( - "

\n$1\n

", - [ 'importfailed', $source->getWikiText() ] - ); + $out->addWikiText( "

\n" . + $this->msg( 'importfailed', $source->getWikiText() )->parse() . "\n

" ); } else { $importer = new WikiImporter( $source->value, $this->getConfig() ); if ( !is_null( $this->namespace ) ) { @@ -534,6 +531,7 @@ class SpecialImport extends SpecialPage { */ class ImportReporter extends ContextSource { private $reason = false; + private $logTags = []; private $mOriginalLogCallback = null; private $mOriginalPageOutCallback = null; private $mLogItemCount = 0; @@ -556,6 +554,16 @@ class ImportReporter extends ContextSource { $this->reason = $reason; } + /** + * Sets change tags to apply to the import log entry and null revision. + * + * @param array $tags + * @since 1.29 + */ + public function setChangeTags( array $tags ) { + $this->logTags = $tags; + } + function open() { $this->getOutput()->addHTML( "