Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1243,10 +1243,6 @@ |
1244 | 1244 | 'shareduploadwiki-desc', |
1245 | 1245 | 'shareduploadwiki-linktext', |
1246 | 1246 | 'shareddescriptionfollows', |
1247 | | - 'shareduploadduplicate', |
1248 | | - 'shareduploadduplicate-linktext', |
1249 | | - 'shareduploadconflict', |
1250 | | - 'shareduploadconflict-linktext', |
1251 | 1247 | 'noimage', |
1252 | 1248 | 'noimage-linktext', |
1253 | 1249 | 'uploadnewversion-linktext', |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -117,8 +117,6 @@ |
118 | 118 | $wgOut->addWikiText( $fol ); |
119 | 119 | } |
120 | 120 | $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription . '</div>' ); |
121 | | - } else { |
122 | | - $this->checkSharedConflict(); |
123 | 121 | } |
124 | 122 | |
125 | 123 | $this->closeShowImage(); |
— | — | @@ -502,54 +500,6 @@ |
503 | 501 | } |
504 | 502 | } |
505 | 503 | |
506 | | - /* |
507 | | - * Check for files with the same name on the foreign repos. |
508 | | - */ |
509 | | - protected function checkSharedConflict() { |
510 | | - global $wgOut, $wgUser; |
511 | | - |
512 | | - $repoGroup = RepoGroup::singleton(); |
513 | | - if( !$repoGroup->hasForeignRepos() ) { |
514 | | - return; |
515 | | - } |
516 | | - |
517 | | - $this->loadFile(); |
518 | | - if( !$this->img->isLocal() ) { |
519 | | - return; |
520 | | - } |
521 | | - |
522 | | - $this->dupFile = null; |
523 | | - $repoGroup->forEachForeignRepo( array( $this, 'checkSharedConflictCallback' ) ); |
524 | | - |
525 | | - if( !$this->dupFile ) |
526 | | - return; |
527 | | - $dupfile = $this->dupFile; |
528 | | - $same = ( |
529 | | - ($this->img->getSha1() == $dupfile->getSha1()) && |
530 | | - ($this->img->getSize() == $dupfile->getSize()) |
531 | | - ); |
532 | | - |
533 | | - $sk = $wgUser->getSkin(); |
534 | | - $descUrl = $dupfile->getDescriptionUrl(); |
535 | | - if( $same ) { |
536 | | - $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadduplicate-linktext' ) ); |
537 | | - $wgOut->addHTML( '<div id="shared-image-dup">' . wfMsgWikiHtml( 'shareduploadduplicate', $link ) . '</div>' ); |
538 | | - } else { |
539 | | - $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadconflict-linktext' ) ); |
540 | | - $wgOut->addHTML( '<div id="shared-image-conflict">' . wfMsgWikiHtml( 'shareduploadconflict', $link ) . '</div>' ); |
541 | | - } |
542 | | - } |
543 | | - |
544 | | - public function checkSharedConflictCallback( $repo ) { |
545 | | - $this->loadFile(); |
546 | | - $dupfile = $repo->newFile( $this->img->getTitle() ); |
547 | | - if( $dupfile && $dupfile->exists() ) { |
548 | | - $this->dupFile = $dupfile; |
549 | | - return $dupfile->exists(); |
550 | | - } |
551 | | - return false; |
552 | | - } |
553 | | - |
554 | 504 | public function getUploadUrl() { |
555 | 505 | $this->loadFile(); |
556 | 506 | $uploadTitle = SpecialPage::getTitleFor( 'Upload' ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1986,10 +1986,6 @@ |
1987 | 1987 | 'shareduploadwiki-desc' => 'The description on its $1 on the shared repository is shown below.', |
1988 | 1988 | 'shareduploadwiki-linktext' => 'file description page', |
1989 | 1989 | 'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages |
1990 | | -'shareduploadduplicate' => 'This file is a duplicate of $1 from shared repository.', |
1991 | | -'shareduploadduplicate-linktext' => 'another file', |
1992 | | -'shareduploadconflict' => 'This file has the same name as $1 from the shared repository.', |
1993 | | -'shareduploadconflict-linktext' => 'another file', |
1994 | 1990 | 'noimage' => 'No file by this name exists, but you can $1.', |
1995 | 1991 | 'noimage-linktext' => 'upload one', |
1996 | 1992 | 'uploadnewversion-linktext' => 'Upload a new version of this file', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -184,6 +184,7 @@ |
185 | 185 | in next page link |
186 | 186 | * (bug 17506) Exceptions within exceptions now respect $wgShowExceptionDetails |
187 | 187 | * Fixed excessive job queue utilisation |
| 188 | +* File dupe messages for remote repos are now shown only once. |
188 | 189 | |
189 | 190 | == API changes in 1.15 == |
190 | 191 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |