[TYPO3] Extending class.t3lib_foldertree.php fails

Sven Schwyn echo58 at delirium.ch
Mon Jul 9 13:31:02 CEST 2007


I'm working on an extension that's filtering out files/dirs starting  
with "." from different views - in order to hide .svn dirs.

While this works for several other typo3 and t3lib classes, I'm  
having a hard time extending class.t3lib_foldertree.php. The XCLASS  
file class.ux_t3lib_foldertree.php is declared correctly and IS  
included by the original class file. The class name  
(t3lib_folderTree) and method name (getFolderTree) are okay as well.  
Still, the original method is used nevertheless.

Here's how I've tried: I've created a page containing an images  
content element. The filebrowser to choose an image from fileadmin is  
rendered by the getFolderTree method in the t3lib_folderTree class.  
If I alter it to ignore files starting with ".", the .svn directories  
are no longer listed. Then I've put the altered function into  
class.ux_t3lib_foldertree.php in my extension and linked it in via  
XCLASS. The ux file is included (tested with die), but the  
overwriting getFoldTree method is not used, rather the original one -  
so the .svn directories pop up again.

I'm very greatful for anyone with more core knowledge than me looking  
at it and giving me a hint why this fails. My extension can be found  

T3X_isunic_dotfiles-0_1_0.t3x.gz     (gzipped!)

By the way, I've submitted a bug http://bugs.typo3.org/view.php? 
id=5779 in order to allow the hiding of dotfiles globally. I'm  
confident, I can get my employer to sponsor this bug with some cash,  
I'll get an answer very soon.

Thanks very much for your help!!   -sven

More information about the TYPO3-english mailing list