mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-19 13:25:36 -04:00
Support making an album the album cover for its parent
This commit is contained in:
@@ -80,7 +80,12 @@ class Quick_Controller extends Controller {
|
||||
$parent = $item->parent();
|
||||
access::required("edit", $parent);
|
||||
|
||||
$parent->album_cover_item_id = $item->id;
|
||||
if ($item->type == "photo") {
|
||||
$parent->album_cover_item_id = $item->id;
|
||||
} else if ($item->type == "album") {
|
||||
$parent->album_cover_item_id = $item->album_cover_item_id;
|
||||
}
|
||||
|
||||
$parent->thumb_dirty = 1;
|
||||
$parent->save();
|
||||
graphics::generate($parent);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<? if ($item->type == "photo" && access::can("edit", $item->parent())): ?>
|
||||
<? if (access::can("edit", $item->parent())): ?>
|
||||
<a class="cover" href="<?= url::site("quick/make_album_cover/$item->id?csrf=" . access::csrf_token()) ?>"
|
||||
title="<?= t("Select as album cover") ?>">
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user