X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialImport.php;h=a985bcc6386ed983f4871e0f98a3ee6cc3b6cb7e;hb=6bc04b3b4c48121eddc4bcd7e2f73d3b7d8b10a8;hp=3ef64f881f3d2bf11d6e2d48eb49b3fd1b5671ec;hpb=9171317645de4d31c61c570a9e4fa765e09ecc4d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 3ef64f881f..a985bcc638 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -179,8 +179,9 @@ class SpecialImport extends SpecialPage { $out = $this->getOutput(); if ( !$source->isGood() ) { - $out->addWikiText( "

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

" ); + $out->wrapWikiTextAsInterface( 'error', + $this->msg( 'importfailed', $source->getWikiText() )->plain() + ); } else { $importer = new WikiImporter( $source->value, $this->getConfig() ); if ( !is_null( $this->namespace ) ) { @@ -189,7 +190,7 @@ class SpecialImport extends SpecialPage { $statusRootPage = $importer->setTargetRootPage( $this->rootpage ); if ( !$statusRootPage->isGood() ) { $out->wrapWikiMsg( - "

\n$1\n

", + "
\n$1\n
", [ 'import-options-wrong', $statusRootPage->getWikiText(), @@ -224,13 +225,13 @@ class SpecialImport extends SpecialPage { if ( $exception ) { # No source or XML parse error $out->wrapWikiMsg( - "

\n$1\n

", + "
\n$1\n
", [ 'importfailed', $exception->getMessage() ] ); } elseif ( !$result->isGood() ) { # Zero revisions $out->wrapWikiMsg( - "

\n$1\n

", + "
\n$1\n
", [ 'importfailed', $result->getWikiText() ] ); } else { @@ -279,6 +280,7 @@ class SpecialImport extends SpecialPage { 'selected' => ( $isSameSourceAsBefore ? $this->namespace : ( $defaultNamespace || '' ) ), + 'in-user-lang' => true, ], [ 'name' => "namespace", // mw-import-namespace-interwiki, mw-import-namespace-upload