Package for Umbraco 7 - This package create a new custom section with this tools: Umbraco logs manager, Media folder cleanup, Delete users and Version manager
Hello,
I am looking at the code of the Media Cleanup code and both in the btnCheckOrphan_Click function than in the btnDeleteOrphan_Click function there is a "double check" about the presence of the image in the cmsContentXml or cmsPropertyData folder. I have two notes:
1) If the image has already been found in the cmsContentXml table, there shouldn't be any need to check for it also in the cmsPropertyData table, since anyway you can't delete this image, am I right? If you would perform the second query (the one on cmsPropertyData) only if mediaCount == 0 we would save the half of the queries on the database;
2) Are you sure there is not the way to make the same checks (at least on the cmsContentXml) using the Umbraco Business Logic? In this way we would avoid a lot of queries and make the cleanup much faster.
Hello, I am looking at the code of the Media Cleanup code and both in the btnCheckOrphan_Click function than in the btnDeleteOrphan_Click function there is a "double check" about the presence of the image in the cmsContentXml or cmsPropertyData folder. I have two notes:
1) If the image has already been found in the cmsContentXml table, there shouldn't be any need to check for it also in the cmsPropertyData table, since anyway you can't delete this image, am I right? If you would perform the second query (the one on cmsPropertyData) only if mediaCount == 0 we would save the half of the queries on the database; 2) Are you sure there is not the way to make the same checks (at least on the cmsContentXml) using the Umbraco Business Logic? In this way we would avoid a lot of queries and make the cleanup much faster.
What do you think about that?
Thanks, Michele