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 @@
2687
2687
if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
2688
2688
$errors[] = array('imagetypemismatch');
2689
2689
}
2690
- } elseif( !$wgUser->isAllowed( 'reupload-shared' ) && wfFindFile( $nt ) ) {
2690
+ }
2691
+ $destfile = wfLocalFile( $nt );
2692
+ if( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) {
2691
2693
$errors[] = array( 'file-exists-sharedrepo' );
2692
2694
}
2693
2695
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r60418
Per CR on
r58079
, add a permission check for 'reupload-shared' to...
mrzman
21:56, 26 December 2009
Status & tagging log
06:47, 30 December 2009
Tim Starling
(
talk
|
contribs
)
changed the
status
of r60420
[
removed:
new
added:
ok]