summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-19 01:12:09 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-19 01:12:09 -0800
commita587426cfda4a0cd4e8f3f53607c8e3ad2305506 (patch)
treeb3c3f17d23e3e2a0bf399d3e003fe045a73b9633
parentcb7c263b470bd1452c47a3e29d67373869150d2c (diff)
Don't try to set the album cover for the grandparent if we don't have edit permissions for it.
-rw-r--r--modules/gallery/helpers/item.php2
1 files changed, 1 insertions, 1 deletions
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);
}
}