... I want to know the reason for this function (older files deleted as new ones added;) to exist. Why and in which case we can use it.
I just try it, and just feel that there's something's wrong with the idea.
says if I have a category with some limit number of images in that cat.
When member upload more than the limit, there're few cases:
1. Member doesnt even know that older images are deleted (if there're few hundred of them in one cat => old images are deleted out of the sky, no one know or aware of it (no confirmation either)
2. Member can upload a whole bunch of junk pictures, and delete all "old" valuable pictures, which they should not have permission to do this.
well, so I dont think the function should exist here, at all.
Member need to be atleast moderator or admin to be able to delete any picture (including old ones) (unless specified otherwise)
so I insist of looking back at this function, and give a good solution for it.
I would suggest that member cant upload if the limit is reach, and moderator need to delete pictures (bad ones, or old ones), or upgrade category limit, before any new pictures can be added.