[TYPO3-core] RFC: Bug #11005: Browse Links Popup shows no files when all file types are allowed

Jeff Segars jsegars at alumni.rice.edu
Tue Apr 13 22:04:03 CEST 2010


Hey guys,

This is a SVN patch request.
	
Type: Bugfix
Bugtracker reference: http://bugs.typo3.org/view.php?id=11005
Branch: trunk, 4.3

Problem:
According to doc_core_api, when working with file uploads in the TCA

"If you wish to allow all extensions with no exceptions, set 'allowed' 
to '*' and disallowed to ''"

When these settings are added, no files are shown in the browse links 
popup due to the wildcard parameter.  Direct file uploads work as expected.

Solution:
Modify the browse links class to convert the wildcard parameter into an 
empty string which will show all files.

Additional Notes:
#1 - I'm attaching a test extension that modifies the images field in 
tt_content to allow all file types.

#2 - An alternative approach would be to patch 
t3lib_div::getFilesInDir() to accept a wildcard character or empty 
string. We could also patch the the code that creates the URL for the 
browse links popup, but I think both of these options are more invasive 
so I feel little safer with the current patch

#3 - The browse links popup has some other issues too.  It only accounts 
for allowed file types and not disallowed and doesn't hide files that 
TYPO3 will not allowed to be copied (ie. PHP). Hopefully I can handle 
those in a later RFC.

Thanks,
Jeff


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11005_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100413/66fcaf61/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: T3X_test_filetypes.t3x
Type: application/octet-stream
Size: 2468 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100413/66fcaf61/attachment.obj>


More information about the TYPO3-team-core mailing list