[TYPO3-dam-devel] RFC #10193: Deleting a file shows faulty references warning

Michael Stucki michael at typo3.org
Mon Jan 19 16:37:21 CET 2009


This is a SVN patch request.

Extension: dam

Branches: dam_1-1 / trunk

Type: Bugfix

Reference: http://bugs.typo3.org/view.php?id=10193

Problem:
When removing a file, I always get a warning stating that the file is
still used on that website. However, it is not.

Solution:
The bug was introduced recently (rev. 14905) by mixing content selection
with content rendering. Instead of false the getReferencesTable()
function returns a string ("The file is not used.").

The solution is to separate between selection of data and rendering
data. In case of no records, false should be returned.

The attached patch fixes the problem. However, it's still not so pretty
that "getReferencesTable" is actually a rendering method although just a
few lines down there is also a function called "renderReferencesTable"...

Comments:
There is an additional patch attached which does not relate with this
problem, it's just some cleanup to make the code more simple (all of
these variables default to '' already, so this can be skipped).

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_10193_getReferences.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20090119/03b726c2/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_10193_getReferences_post-cleanup.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20090119/03b726c2/attachment-0001.txt 


More information about the TYPO3-team-dam mailing list