Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

WSOD when viewing image without permission. #18

Closed
brettp opened this Issue · 7 comments

2 participants

@brettp

Fatal error: Call to a member function addView() on a non-object in /Users/brett/Devel/elgg/master/mod/tidypics/pages/photos/image/view.php on line 18

@brettp

Larger problem with access controls. If you set the access to public on the album it gives a WSOD when logged out if the images' access levels don't match.

@cash
Owner

Makes sense because of storing the images as metadata on the album - another good reason for adding ElggCollection

@brettp

Makes sense but sucks. Best solution for now seems to be forcing the images to the same access level as the album.

@cash
Owner

I think the logic in the get next image could check and get the next image if the user doesn't have permission - just need to prevent infinite loops

@brettp

This would make the image counts odd. Could skip from 1 of 7 to 7 of 7. Not a problem?

@brettp

And by "odd" I mean "incorrect."

@cash
Owner

In all previous versions, images did not have individual access settings but inherited from the album. I thought adding that would be useful because in future there may be the possibility of putting an image in more than one album. Flickr supports access per image and sets the number of photos in a set based on access. Should be possible to do that with elgg_get_entities() and count.

@brettp brettp referenced this issue from a commit in brettp/Tidypics
@brettp brettp Refs #18. Doing an access check on TidypicsAlbum->getImageList() to o…
…nly return images the current user can access.

This is a simple fix, but requires an extra DB call for the first getImageList() call.
b09db0e
@cash cash closed this in e528700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.