summaryrefslogtreecommitdiff
path: root/core/controllers/quick.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-29 03:14:43 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-29 03:14:43 +0000
commit8d4b0afa4f42f6c00482bf72a2ce4c8b3a40028b (patch)
tree7347f20e2ebb4bfa2aa56e8c96db2ed15a8b4b2d /core/controllers/quick.php
parent01d81ec6b42d30db83a1a12bbd2e5bc08944b0e2 (diff)
Support making an album the album cover for its parent
Diffstat (limited to 'core/controllers/quick.php')
-rw-r--r--core/controllers/quick.php7
1 files changed, 6 insertions, 1 deletions
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);