summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/controllers/quick.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/controllers/quick.php b/core/controllers/quick.php
index 77a39bf5..96f05aab 100644
--- a/core/controllers/quick.php
+++ b/core/controllers/quick.php
@@ -106,6 +106,12 @@ class Quick_Controller extends Controller {
$msg = t("Deleted photo <b>%title</b>", array("title" => $item->title));
}
+ if ($parent->album_cover_item_id == $item->id) {
+ // @todo change the album cover to some other random image inside the album
+ $parent->album_cover_item_id = null;
+ $parent->save();
+ }
+
module::event("item_before_delete", $item);
$item->delete();
message::success($msg);