# If the file existed before and was deleted, warn the user of this
# Don't bother doing so if the file exists now, however
if( $this->mLocalFile->wasDeleted() && !$this->mLocalFile->exists() )
- $warning['filewasdeleted'] = true;
+ $warning['filewasdeleted'] = $this->mLocalFile->getTitle();
return $warning;
}
return array( 'exists', $file );
if( $file->getTitle()->getArticleID() )
- return array( 'page-exists', false );
+ return array( 'page-exists', $file );
if( strpos( $file->getName(), '.' ) == false ) {
$partname = $file->getName();
* @access private
*/
function uploadWarning( $warnings ) {
- global $wgOut;
+ global $wgOut, $wgUser;
global $wgUseCopyrightUpload;
$this->mSessionKey = $this->mUpload->stashSession();
# Couldn't save file; an error has been displayed so let's go.
return;
}
+
+ $sk = $wgUser->getSkin();
$wgOut->addHTML( '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" );
$wgOut->addHTML( '<ul class="warning">' );
} elseif( $warning == 'filewasdeleted' ) {
$ltitle = SpecialPage::getTitleFor( 'Log' );
$llink = $sk->makeKnownLinkObj( $ltitle, wfMsgHtml( 'deletionlog' ),
- 'type=delete&page=' . $file->getTitle()->getPrefixedUrl() );
+ 'type=delete&page=' . $args->getPrefixedUrl() );
$msg = "\t<li>" . wfMsgWikiHtml( 'filewasdeleted', $llink ) . "</li>\n";
} else {
if( is_bool( $args ) )