From e3b5eca50ef1e421b2f4b97309882df4dd9f5855 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 2 Feb 2009 05:00:09 +0000 Subject: Add sending notifications when an item is deleted. We are almost done, just need to do comments. --- modules/notification/helpers/notification.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/notification/helpers') diff --git a/modules/notification/helpers/notification.php b/modules/notification/helpers/notification.php index 9a942728..c25da16d 100644 --- a/modules/notification/helpers/notification.php +++ b/modules/notification/helpers/notification.php @@ -107,9 +107,14 @@ class notification { self::_send_message($item, $body); } - static function send_item_delete($item) { + static function send_item_deleted($item) { + $parent = $item->parent(); $body = new View("item_deleted.html"); - $body->subject = sprintf(t("Item deleted from %s"), $item->parent()->title); + $body->subject = sprintf(t("Item %s deleted from %s"), $item->title, $parent->title); + $body->parent_title = $parent->title; + $body->type = $item->type; + $body->item_title = $item->title; + $body->url = url::site("albums/$parent->id", "http"); self::_send_message($item, $body); } -- cgit v1.2.3