dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23e5963
)
Fix for r60418, need to check whether the /destination/ file exists
author
Alex Z
<mrzman@users.mediawiki.org>
Sat, 26 Dec 2009 22:04:37 +0000
(22:04 +0000)
committer
Alex Z
<mrzman@users.mediawiki.org>
Sat, 26 Dec 2009 22:04:37 +0000
(22:04 +0000)
locally, not the file at the current title
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
89b01f4
..
d0fee24
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-2686,7
+2686,9
@@
class Title {
if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
$errors[] = array('imagetypemismatch');
}
- } elseif( !$wgUser->isAllowed( 'reupload-shared' ) && wfFindFile( $nt ) ) {
+ }
+ $destfile = wfLocalFile( $nt );
+ if( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) {
$errors[] = array( 'file-exists-sharedrepo' );
}