r60420 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60419‎ | r60420 | r60421 >
Date:22:04, 26 December 2009
Author:mrzman
Status:ok
Tags:
Comment:
Fix for r60418, need to check whether the /destination/ file exists
locally, not the file at the current title
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2686,7 +2686,9 @@
26872687 if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
26882688 $errors[] = array('imagetypemismatch');
26892689 }
2690 - } elseif( !$wgUser->isAllowed( 'reupload-shared' ) && wfFindFile( $nt ) ) {
 2690+ }
 2691+ $destfile = wfLocalFile( $nt );
 2692+ if( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) {
26912693 $errors[] = array( 'file-exists-sharedrepo' );
26922694 }
26932695

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60418Per CR on r58079, add a permission check for 'reupload-shared' to...mrzman21:56, 26 December 2009

Status & tagging log