X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialImport.php;h=5ca90ed786159c904caed9b3100a80524e7b406a;hb=28c98539cd0fd4a1cf5e9ce7662b7a360fb64dbb;hp=e2bc62903c25eaf88b09604fb59295e18f1de184;hpb=a74baa198cf96178365216a1c5d8c138903c6f40;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index e2bc62903c..5ca90ed786 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -596,30 +596,29 @@ class ImportReporter extends ContextSource { "\n" ); + $logParams = array( '4:number:count' => $successCount ); if ( $this->mIsUpload ) { $detail = $this->msg( 'import-logentry-upload-detail' )->numParams( $successCount )->inContentLanguage()->text(); - if ( $this->reason ) { - $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() - . $this->reason; - } $action = 'upload'; } else { - $interwiki = '[[:' . $this->mInterwiki . ':' . - $foreignTitle->getFullText() . ']]'; + $interwikiTitleStr = $this->mInterwiki . ':' . $foreignTitle->getFullText(); + $interwiki = '[[:' . $interwikiTitleStr . ']]'; $detail = $this->msg( 'import-logentry-interwiki-detail' )->numParams( $successCount )->params( $interwiki )->inContentLanguage()->text(); - if ( $this->reason ) { - $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() - . $this->reason; - } $action = 'interwiki'; + $logParams['5:title-link:interwiki'] = $interwikiTitleStr; + } + if ( $this->reason ) { + $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() + . $this->reason; } $logEntry = new ManualLogEntry( 'import', $action ); $logEntry->setTarget( $title ); - $logEntry->setComment( $detail ); + $logEntry->setComment( $this->reason ); $logEntry->setPerformer( $this->getUser() ); + $logEntry->setParameters( $logParams ); $logid = $logEntry->insert(); $logEntry->publish( $logid );