theme_image_gallery() uses $gallery->latest to create a gallery's thumbnail from the latest node, without checking to make sure the node type is 'image' first.

On sites where other node types are allowed to share the image gallery vocabulary, this can result in missing gallery thumbnails.

This patch makes sure that the 'latest' node is an image.

Comments

zach harkey’s picture

Status: Active » Needs review
drewish’s picture

Status: Needs review » Fixed
StatusFileSize
new1.31 KB

I switched the outer quotes from single to double because i seem to remember SQL perferering single quotes. committed the attached to head. thanks!

drewish’s picture

Version: 5.x-2.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

oh... i actually fixed this in head. it'll probably need a re-roll for 5.x-2.x

drewish’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev
Status: Patch (to be ported) » Fixed

committed to DRUPAL-5--2

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.