From 8d4b0afa4f42f6c00482bf72a2ce4c8b3a40028b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 29 Jan 2009 03:14:43 +0000 Subject: Support making an album the album cover for its parent --- core/controllers/quick.php | 7 ++++++- core/views/quick_pane.html.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/controllers/quick.php b/core/controllers/quick.php index 44ca32b4..b9a8fb82 100644 --- a/core/controllers/quick.php +++ b/core/controllers/quick.php @@ -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); diff --git a/core/views/quick_pane.html.php b/core/views/quick_pane.html.php index 8d39d214..35c9dcf1 100644 --- a/core/views/quick_pane.html.php +++ b/core/views/quick_pane.html.php @@ -28,7 +28,7 @@ -type == "photo" && access::can("edit", $item->parent())): ?> +parent())): ?> id?csrf=" . access::csrf_token()) ?>" title=""> -- cgit v1.2.3