Got a report that the showphoto page loads "forever" if you're coming from recent photos.
Params are like this:
I think there's a bug while creating the correct query to grab the photos.
Content visible to verified customers only.
As there's a cat=all in the param list, the elseif for the limit won't be executed at all. Although that would be the right one, at least in my opinion. I flipped the OR to an AND, but I'm not sure if this will cause problems elsewhere. So maybe you can have a look at it.
Another fix would probably be to remove the cat=all param from the recent photo links.