} elseif ( $warning == 'duplicate' ) {
$msg = $this->getDupeWarning( $args );
} elseif ( $warning == 'duplicate-archive' ) {
- $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate',
- Title::makeTitle( NS_FILE, $args )->getPrefixedText() )->parse()
- . "</li>\n";
+ if ( $args === '' ) {
+ $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate-notitle' )->parse()
+ . "</li>\n";
+ } else {
+ $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate',
+ Title::makeTitle( NS_FILE, $args )->getPrefixedText() )->parse()
+ . "</li>\n";
+ }
} else {
if ( $args === true ) {
$args = array();
// Check dupes against archives
$archivedImage = new ArchivedFile( null, 0, "{$hash}.{$this->mFinalExtension}" );
if ( $archivedImage->getID() > 0 ) {
- $warnings['duplicate-archive'] = $archivedImage->getName();
+ if ( $archivedImage->userCan( File::DELETED_FILE ) ) {
+ $warnings['duplicate-archive'] = $archivedImage->getName();
+ } else {
+ $warnings['duplicate-archive'] = '';
+ }
}
wfProfileOut( __METHOD__ );
'file-exists-duplicate' => 'This file is a duplicate of the following {{PLURAL:$1|file|files}}:',
'file-deleted-duplicate' => "A file identical to this file ([[:$1]]) has previously been deleted.
You should check that file's deletion history before proceeding to re-upload it.",
+'file-deleted-duplicate-notitle' => "A file identical to this file has previously been deleted, and the title has been suppressed.
+You should ask someone with the ability to view suppressed file data to review the situation before proceeding to re-upload it.",
'uploadwarning' => 'Upload warning',
'uploadwarning-text' => 'Please modify the file description below and try again.',
'savefile' => 'Save file',
Parameters:
* $1 - number of duplicate files',
'file-deleted-duplicate' => 'Used in [[Special:Upload]. Parameters:
-* $1 - page title of the file',
+* $1 - page title of the file
+
+See also:
+* {{msg-mw|file-deleted-duplicate-notitle}}',
+'file-deleted-duplicate-notitle' => 'Used in [[Special:Upload] when the title of the deleted duplicate is not available.
+
+See also:
+* {{msg-mw|file-deleted-duplicate}}',
'uploadwarning' => 'Used as section header in [[Special:Upload]].',
'uploadwarning-text' => 'Used in [[Special:Upload]].',
'savefile' => 'When uploading a file',
'fileexists-shared-forbidden',
'file-exists-duplicate',
'file-deleted-duplicate',
+ 'file-deleted-duplicate-notitle',
'uploadwarning',
'uploadwarning-text',
'savefile',