From a587426cfda4a0cd4e8f3f53607c8e3ad2305506 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 19 Jan 2010 01:12:09 -0800 Subject: Don't try to set the album cover for the grandparent if we don't have edit permissions for it. --- modules/gallery/helpers/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 53291ccc..7821e628 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -59,7 +59,7 @@ class item_Core { $parent->save(); graphics::generate($parent); $grand_parent = $parent->parent(); - if ($grand_parent && $grand_parent->album_cover_item_id == null) { + if (access::can("edit", $grand_parent) && $grand_parent->album_cover_item_id == null) { item::make_album_cover($parent); } } -- cgit v1.2.3