r24239 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24238‎ | r24239 | r24240 >
Date:12:33, 18 July 2007
Author:raymond
Status:old
Tags:
Comment:
fix to show the source article name in log
Modified paths:
  • /trunk/phase3/includes/SpecialImport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialImport.php
@@ -74,7 +74,7 @@
7575 if( !is_null( $articleName ) ) {
7676 $importer->setTargetArticleName( $articleName );
7777 }
78 - $reporter = new ImportReporter( $importer, $isUpload, $interwiki );
 78+ $reporter = new ImportReporter( $importer, $isUpload, $interwiki, $frompage );
7979
8080 $reporter->open();
8181 $result = $importer->doImport();
@@ -175,11 +175,12 @@
176176 * @addtogroup SpecialPage
177177 */
178178 class ImportReporter {
179 - function __construct( $importer, $upload, $interwiki ) {
 179+ function __construct( $importer, $upload, $interwiki, $frompage ) {
180180 $importer->setPageOutCallback( array( $this, 'reportPage' ) );
181181 $this->mPageCount = 0;
182182 $this->mIsUpload = $upload;
183183 $this->mInterwiki = $interwiki;
 184+ $this->mFrompage = $frompage;
184185 }
185186
186187 function open() {
@@ -209,8 +210,11 @@
210211 $contentCount );
211212 $log->addEntry( 'upload', $title, $detail );
212213 } else {
213 - $interwiki = '[[:' . $this->mInterwiki . ':' .
214 - $origTitle->getPrefixedText() . ']]';
 214+ // Show the source article name in log
 215+ $origin = $this->mFrompage != $origTitle->getPrefixedText()
 216+ ? $this->mFrompage
 217+ : $origTitle->getPrefixedText();
 218+ $interwiki = '[[:' . $this->mInterwiki . ':' . $origin . ']]';
215219 $detail = wfMsgForContent( 'import-logentry-interwiki-detail',
216220 $contentCount, $interwiki );
217221 $log->addEntry( 'interwiki', $title, $detail );

Follow-up revisions

RevisionCommit summaryAuthorDate
r24250Revert r24237, r24239, r24245 for the moment. We expect transwiki system to c...brion20:05, 18 July 2007
r24276Merged revisions 24213-24275 via svnmerge from...david20:20, 19 July 2007

Status & tagging log