diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-29 03:57:24 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-29 03:57:24 +0000 |
commit | 33122e8968e2d7890f7fabe45ce168aa0d217bbb (patch) | |
tree | 36e67fd507f9308cd21c185056fc40d7a5a042cd /modules/organize/helpers | |
parent | 89bdd6ca983585d5bf41968ee355927169cc9e14 (diff) |
Change album cover functionality added
Diffstat (limited to 'modules/organize/helpers')
-rw-r--r-- | modules/organize/helpers/organize_task.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/organize/helpers/organize_task.php b/modules/organize/helpers/organize_task.php index e66795b8..c0315aba 100644 --- a/modules/organize/helpers/organize_task.php +++ b/modules/organize/helpers/organize_task.php @@ -52,6 +52,20 @@ class organize_task_Core { self:: _do_rotation($item, $taskType == "rotateCcw" ? -90 : 90); } break; + case "albumCover": + $item = ORM::factory("item", $id); + $parent = $item->parent(); + + if ($item->is_photo()) { + $parent->album_cover_item_id = $item->id; + } else if ($item->is_album()) { + $parent->album_cover_item_id = $item->album_cover_item_id; + } + + $parent->thumb_dirty = 1; + $parent->save(); + graphics::generate($parent); + break; case "delete": $item = ORM::factory("item", $id); $item->delete(); |