r79693 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79692‎ | r79693 | r79694 >
Date:00:12, 6 January 2011
Author:emufarmers
Status:ok (Comments)
Tags:
Comment:
Follow-up to r78285: remove blacklisted file types from $wgFileExtensions in Setup.php, rather than in specials/SpecialUpload.php.
Modified paths:
  • /trunk/phase3/includes/Setup.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -298,6 +298,9 @@
299299 $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
300300 }
301301
 302+# Blacklisted file extensions shouldn't appear on the "allowed" list
 303+$wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist );
 304+
302305 wfProfileOut( $fname.'-misc1' );
303306 wfProfileIn( $fname.'-memcached' );
304307
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -899,9 +899,6 @@
900900 $wgFileExtensions, $wgFileBlacklist;
901901
902902 if( $wgCheckFileExtensions ) {
903 - //don't show blacklisted types as permitted
904 - $wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist );
905 -
906903 if( $wgStrictFileExtensions ) {
907904 # Everything not permitted is banned
908905 $extensionsList =

Follow-up revisions

RevisionCommit summaryAuthorDate
r797191.17: MFT r78078, r78285, r78787, r79246, r79358, r79480, r79481, r79491, r79...catrope14:15, 6 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78285Follow-up to r77956: instead of making $wgFileExtensions override $wgFileBlac...emufarmers23:19, 12 December 2010

Comments

#Comment by 😂 (talk | contribs)   00:18, 6 January 2011

Should go in Setup.php, DefaultSettings is for settings.

#Comment by 😂 (talk | contribs)   00:19, 6 January 2011

Wow, ignore me.

Status & tagging log