Chuck, I made that changes.
First test:
category cache enabled, above changes applied, using editphoto to delete image
result: as described above. "photos" field in categories table has a value of "2".
Second test:
category cache disabled, changes added, using editphoto to delete image
result: as described above. "photos" field in categories table has a value of "2".
If you want to have a look:
http://fotogalerie.herr-der-ringe-fi...lery.php/cat/2
I'm speaking of the subcategory called "test".