[TYPO3-core] RFC: Bugfix/Feature #5779 (original posted on 2007-09-26!)

Bernhard Kraft kraftb at kraftb.at
Sat Dec 26 12:56:18 CET 2009


Hello !


This is an SVN patch request.
Branch: trunk

Bug #5779:
http://bugs.typo3.org/view.php?id=5779


Problem:
When you administer your fileadmin (the templates and/or pictures there)
with SVN, CVS or similar revision tools - you will soon see requirement to
hide the files/directories created by those tools to the "normal" editor.

A similar patch has already been applied to the Extension Manager -
nowadays .svn directories do not get listed any more when choosing "Edit
files" in the EM.



Solution:
Add a check to the classes (in /typo3/ directory) responsible for rendering
the file-listing and the file-browse-tree.
Add a method "t3lib_div::ignoreFile($file)" in t3lib_div which is a commmon
entry point for letting those files get checked.



Notes:
When this patch was originally posted to the core list (2007-09-26), some
objections were made of which all are taken into account now. Except one
request from Dmitry: He asked if ".htaccess" files will still be visible.
At first I wanted to solve this with two patterns: One for "allow" and one
for "deny" which got objected by Oliver because of the two preg_match
statemens (in which I do not see any problem).

This could get worked around by setting the install tool variable
"ignore_file_pattern" only to "/^(\.svn|CVS)$/" instead of hiding all
dot-files. Currently it is set to hide all .dot files.

So if Dmitry objects this, I would have to either go back to having an
allow + deny pattern, or simply only denying .svn and CVS directory (also
it would be a good idea to probably hide directories like "__MACOS" or
".Thumbs"). Having a negative look ahead like Oliver proposed is not a good
idea, as it probably is slower than having two preg_match calls.



Patch attached: 5779_file_ignore_rev6698.diff
And can be found on the bugtracker.


greets,
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5779_file_ignore_rev6698.diff
Type: text/x-patch
Size: 9140 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20091226/279f2a8b/attachment.bin>


More information about the TYPO3-team-core mailing list