r60774 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60773‎ | r60774 | r60775 >
Date:07:17, 7 January 2010
Author:robla
Status:deferred (Comments)
Tags:todo 
Comment:
SpecialUpload.php warning message for blacklist
Modified paths:
  • /branches/extensionless-files/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: branches/extensionless-files/includes/specials/SpecialUpload.php
@@ -849,8 +849,11 @@
850850 "</div>\n";
851851 }
852852 } else {
853 - # Everything is permitted.
854 - $extensionsList = '';
 853+ # We still block the blacklisted stuff, because it's just nasty
 854+ $extensionsList =
 855+ '<div id="mw-upload-prohibited">' .
 856+ wfMsgWikiHtml( 'upload-prohibited', $wgLang->commaList( $wgFileBlacklist ) ) .
 857+ "</div>\n";
855858 }
856859 return $extensionsList;
857860 }

Comments

#Comment by Bryan (talk | contribs)   14:59, 7 January 2010

The message is not consistent with the check in UploadBase, which is only triggered if $wgCheckTitleFileExtensions is True.

#Comment by RobLa (talk | contribs)   21:19, 7 January 2010

see discussion on r60773

#Comment by Bryan (talk | contribs)   21:54, 7 January 2010

What is meant is that the message is always shown, but the actual check that the message refers to is only executes when $wgCheckTitleFileExtensions is True.

#Comment by RobLa (talk | contribs)   22:29, 7 January 2010

There are two checks:

  1. The check in UploadBase, which is conditional on $wgCheckTitleFileExtensions, as you noted
  2. Another deeper check in FSRepo::prepTarget(), which is unconditional, added in r60773

Should I add a comment to that effect?

Status & tagging log