Marco has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87020
Change subject: No error anymore on uploading files with same base name
......................................................................
No error anymore on uploading files with same base name
Fixing bug 46741: The same name detection prevents uploads with the same base
name. Preventing such uploads is not useful because one can not upload a SVG
which is ment to replace a PNG file. This replacement procedure is often
applied to flags and coat of arms. Also uploading two unrelated files with the
same name is not possible. For example I can not upload
'Four_stroke_engine.svg' and 'Four_stroke_engine.webm'.
Those errors were addressed in numerous discussions and complaints. (See bug
46741, Archives of local VPs, the Commons help desk and the Upload Wizard
feedback page on Commons)
Keep in mind Rillke mentioned one possible use of this feature: "Uploading
Foo.JPG and Foo.jpg should be [...] impossible". However there is another bug
open for that issue and the current feature does create more noise that being
useful.
Change-Id: I1a98bf43284b5045b1ee6c60e64075404fd0a837
---
M includes/upload/UploadBase.php
1 file changed, 0 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/20/87020/1
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 2260241..10187f7 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -1479,17 +1479,6 @@
}
}
- // Check for files with the same name but a different extension
- $similarFiles =
RepoGroup::singleton()->getLocalRepo()->findFilesByPrefix(
- "{$partname}.", 1 );
- if ( count( $similarFiles ) ) {
- return array(
- 'warning' => 'exists-normalized',
- 'file' => $file,
- 'normalizedFile' => $similarFiles[0],
- );
- }
-
if ( self::isThumbName( $file->getName() ) ) {
# Check for filenames like 50px- or 180px-, these are
mostly thumbnails
$nt_thb = Title::newFromText( substr( $partname,
strpos( $partname, '-' ) + 1 ) . '.' . $extension, NS_FILE );
--
To view, visit https://gerrit.wikimedia.org/r/87020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a98bf43284b5045b1ee6c60e64075404fd0a837
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Marco <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits