Marco has uploaded a new change for review. https://gerrit.wikimedia.org/r/136546
Change subject: Make the badprefix-behavior less frustrating ...................................................................... Make the badprefix-behavior less frustrating Multiple feedback comments suggest that the current badprefix-behavior is too strict. E.g: * https://commons.wikimedia.org/w/index.php?oldid=125402878#Nichtaussagekr.C3.A4ftiger_Name * https://commons.wikimedia.org/w/index.php?diff=125398735 * ... Not only there are many false-positive but also a prefix should not be considred bad anymore if there are 15 additional character to describe the file. Change-Id: I3851b2e34571dc44706408a425541b9395aa4793 --- M includes/upload/UploadBase.php 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/136546/1 diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index b32780f..63ac84a 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1754,11 +1754,14 @@ foreach ( self::getFilenamePrefixBlacklist() as $prefix ) { if ( substr( $partname, 0, strlen( $prefix ) ) == $prefix ) { - return array( - 'warning' => 'bad-prefix', - 'file' => $file, - 'prefix' => $prefix - ); + // 15 more chars should be enough to make a filename descriptive + if ( strlen( $partname ) < ( strlen( $prefix ) + 15 ) ) { + return array( + 'warning' => 'bad-prefix', + 'file' => $file, + 'prefix' => $prefix + ); + } } } -- To view, visit https://gerrit.wikimedia.org/r/136546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3851b2e34571dc44706408a425541b9395aa4793 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Marco <mai...@live.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits