https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112837
Revision: 112837
Author: ialex
Date: 2012-03-01 21:29:11 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
* Pass number with numParams() to Message object and let that object format the
number
* Added missing escaped() call from my last commit
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialImport.php
Modified: trunk/phase3/includes/specials/SpecialImport.php
===================================================================
--- trunk/phase3/includes/specials/SpecialImport.php 2012-03-01 21:27:52 UTC
(rev 112836)
+++ trunk/phase3/includes/specials/SpecialImport.php 2012-03-01 21:29:11 UTC
(rev 112837)
@@ -352,8 +352,6 @@
* @return void
*/
function reportPage( $title, $origTitle, $revisionCount, $successCount,
$pageInfo ) {
- global $wgContLang;
-
$args = func_get_args();
call_user_func_array( $this->mOriginalPageOutCallback, $args );
@@ -364,19 +362,16 @@
$this->mPageCount++;
- $localCount = $this->getLanguage()->formatNum( $successCount );
- $contentCount = $wgContLang->formatNum( $successCount );
-
if( $successCount > 0 ) {
$this->getOutput()->addHTML( "<li>" .
Linker::linkKnown( $title ) . " " .
- $this->msg( 'import-revision-count',
$localCount ) .
+ $this->msg( 'import-revision-count'
)->numParams( $successCount )->escaped() .
"</li>\n"
);
$log = new LogPage( 'import' );
if( $this->mIsUpload ) {
- $detail = $this->msg(
'import-logentry-upload-detail',
- $contentCount
)->inContentLanguage()->text();
+ $detail = $this->msg(
'import-logentry-upload-detail' )->numParams(
+ $successCount
)->inContentLanguage()->text();
if ( $this->reason ) {
$detail .= $this->msg(
'colon-separator' )->inContentLanguage()->text() . $this->reason;
}
@@ -384,8 +379,8 @@
} else {
$interwiki = '[[:' . $this->mInterwiki . ':' .
$origTitle->getPrefixedText() . ']]';
- $detail = $this->msg(
'import-logentry-interwiki-detail',
- $contentCount, $interwiki
)->inContentLanguage()->text();
+ $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;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs