I upgraded to 1.1.5 this weekend and noticed how the album thumbnails were constantly changing on every visit - selected on random. With a gallery like mine (~300 albums, >3700 pics) this renders the cache useless, and causes tremendous overhead for the server. The site took several seconds to load every time. :/
My preference is to select the first image from the newest directory; thus updating a gallery thumb only when content has been added (unless I've manually selected a thumb for it). It gives a useful visual clue for visitors and scales a lot better.
The change is simple: open class-album.php and look for the function getAlbumThumbImage(). Disable lines 614 (shuffle($thumbs)) and 625 (shuffle($subalbums)) to do away with random selection, and then change array_pop for array_shift to select the front-most image of the new album.
Updating to Zenphoto 1.2 I noticed a change in the default behaviour. ZP Core will now use array_shift (newest image of the album), and only shuffle if no thumbnail has been manually set.
This doesn't help us that've got hundreds of galleries since before the change, but it does make the hack a lot easier. Instead of what I outlined in the first post, simply change line 655:
$shuffle = $thumb != '1';
to:
$shuffle = false;
Just updated from trunk and had to resolve this issue once and for all. Here's the query to use if anyone needs it:
UPDATE 'albums' SET 'thumb' = 1 WHERE 'thumb' IS NULL;
and for good measure (if you've got a few empty lines like I did):
UPDATE 'albums' SET 'thumb' = 1 WHERE 'thumb' = '';