Index: trunk/phase3/includes/SpecialImport.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | if( !is_null( $articleName ) ) { |
76 | 76 | $importer->setTargetArticleName( $articleName ); |
77 | 77 | } |
78 | | - $reporter = new ImportReporter( $importer, $isUpload, $interwiki ); |
| 78 | + $reporter = new ImportReporter( $importer, $isUpload, $interwiki, $frompage ); |
79 | 79 | |
80 | 80 | $reporter->open(); |
81 | 81 | $result = $importer->doImport(); |
— | — | @@ -175,11 +175,12 @@ |
176 | 176 | * @addtogroup SpecialPage |
177 | 177 | */ |
178 | 178 | class ImportReporter { |
179 | | - function __construct( $importer, $upload, $interwiki ) { |
| 179 | + function __construct( $importer, $upload, $interwiki, $frompage ) { |
180 | 180 | $importer->setPageOutCallback( array( $this, 'reportPage' ) ); |
181 | 181 | $this->mPageCount = 0; |
182 | 182 | $this->mIsUpload = $upload; |
183 | 183 | $this->mInterwiki = $interwiki; |
| 184 | + $this->mFrompage = $frompage; |
184 | 185 | } |
185 | 186 | |
186 | 187 | function open() { |
— | — | @@ -209,8 +210,11 @@ |
210 | 211 | $contentCount ); |
211 | 212 | $log->addEntry( 'upload', $title, $detail ); |
212 | 213 | } 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 . ']]'; |
215 | 219 | $detail = wfMsgForContent( 'import-logentry-interwiki-detail', |
216 | 220 | $contentCount, $interwiki ); |
217 | 221 | $log->addEntry( 'interwiki', $title, $detail ); |