[TYPO3-core] RFC: #16136: Change behaviour of check for allowed file extensions -> make it possible to really restrict to certain file extensions for filemounts
Steffen Gebert
steffen at steffen-gebert.de
Mon Nov 1 23:51:19 CET 2010
> Bugtracker reference: http://bugs.typo3.org/view.php?id=16136
>
> Branches: trunk
>
> With the settings
> $TYPO3_CONF_VARS['BE']['fileExtensions']['webspace']['allow'] (and
> …['ftpspace']) you ought to be able to restrict what kind of filetypes
> can be used in the filelist module.
Hi Andreas,
thanks for your patch!
I had a look at it and, of course, you're right. The current behavior is
a bit weird :)
Reading your patch, I would say that abandoning early returns makes the
function hard to read.
I reworked it a bit, according to your Unit tests, I made no fault :)
What do you think?
Of course, we could make a huge if-else-elseif-if-else construct, but
IMHO criticism of early returns is more regarding returns inside complex
if-constructs.
+1 by reading and testing
Kind regards
Steffen
--
Steffen Gebert
TYPO3 Core Team Member
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16136_v3_test.diff
Type: text/x-diff
Size: 3345 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101101/a17fd8ba/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16136_v3.diff
Type: text/x-diff
Size: 2454 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101101/a17fd8ba/attachment-0001.diff>
More information about the TYPO3-team-core
mailing list