I'm using Drupal 5.3, with Gallery 2.2.3 and Gallery module 5.x-2.0.

I have a filter to show random images from an album that "anonymous user" has no permissions for. The images appear fine for the right users, but text of the filter appears for everyone else.

CommentFileSizeAuthor
#2 g2filter.patch930 bytesprofix898

Comments

profix898’s picture

The filter indeed only replaces the filter tag, if getImageBlock() returns content from G2. Does the module issue a 'Error trying to get image block.' message if the user is not allowed to see that album? What would be the expected behavior? It should be trivial to fix codewise, but I'm not sure how we should handle such cases in general ...

profix898’s picture

Status: Active » Needs review
StatusFileSize
new930 bytes

The attached patch simply removes the filter tag if no html is returned from G2. Can you please try and comment?

rallycivic’s picture

That works perfectly - thanks very much!

profix898’s picture

Status: Needs review » Fixed

Patch committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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