* Special:Listfiles now supports a username parameter
* Special:Random carries over query string parameters
* (bug 23206) Add Special::Search hook for detecting successful "Go"
+* When visiting a "red link" of a deleted file, a deletion and move log excerpt
+ is provided on the Upload form.
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
$form->addPreText( wfMsgExt( 'session_fail_preview', 'parseinline' ) );
}
+ # Give a notice if the user is uploading a file that has been deleted or moved
+ # Note that this is independent from the message 'filewasdeleted' that requires JS
+ $desiredTitleObj = Title::newFromText( $this->mDesiredDestName, NS_FILE );
+ $delNotice = ''; // empty by default
+ if ( !$desiredTitleObj->exists() ) {
+ LogEventsList::showLogExtract( &$delNotice, array( 'delete', 'move' ),
+ $desiredTitleObj->getPrefixedText(),
+ '', array( 'lim' => 10,
+ 'conds' => array( "log_action != 'revision'" ),
+ 'showIfEmpty' => false,
+ 'msgKey' => array( 'upload-recreate-warning' ) )
+ );
+ }
+ $form->addPreText( $delNotice );
+
# Add text to form
$form->addPreText( '<div id="uploadtext">' .
wfMsgExt( 'uploadtext', 'parse', array( $this->mDesiredDestName ) ) .
'upload_directory_read_only' => 'The upload directory ($1) is not writable by the webserver.',
'uploaderror' => 'Upload error',
'upload-summary' => '', # do not translate or duplicate this message to other languages
+'upload-recreate-warning' => "'''Warning: A file by that name has been deleted or moved.'''
+
+The deletion and move log for this page are provided here for convenience:",
'uploadtext' => "Use the form below to upload files.
To view or search previously uploaded files go to the [[Special:FileList|list of uploaded files]], (re)uploads are also logged in the [[Special:Log/upload|upload log]], deletions in the [[Special:Log/delete|deletion log]].