diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-08-21 12:09:41 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-08-21 12:09:41 +0000 |
commit | 2c873ce8cdd6b402ad770bfbb3357061eb760a80 (patch) | |
tree | 027dbc7f126ae349cd63e091a394a5d5f01be6d6 /actions/addtag.php | |
parent | 0e4c0fc5462386354cdd2c8920be2946f702b98c (diff) | |
download | elgg-2c873ce8cdd6b402ad770bfbb3357061eb760a80.tar.gz elgg-2c873ce8cdd6b402ad770bfbb3357061eb760a80.tar.bz2 |
added tagging notifications - uses user's default notification setting like comments
Diffstat (limited to 'actions/addtag.php')
-rw-r--r-- | actions/addtag.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/actions/addtag.php b/actions/addtag.php index 3f623fc86..2c258db84 100644 --- a/actions/addtag.php +++ b/actions/addtag.php @@ -69,6 +69,7 @@ $access_id = $image->getAccessID();
$owner_id = get_loggedin_userid();
+ $tagger = get_loggedin_user();
//Save annotation
if ($image->annotate('phototag', serialize($tag), $access_id, $owner_id)) {
@@ -79,7 +80,18 @@ // also add this to the river - subject is image, object is the tagged user
if (function_exists('add_to_river'))
- add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id, $access_id);
+ add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id, $access_id);
+
+ // notify user of tagging as long as not self
+ if ($owner_id != $user_id)
+ notify_user($user_id, $owner_id, elgg_echo('tidypics:tag:subject'),
+ sprintf(
+ elgg_echo('tidypics:tag:body'),
+ $image->title,
+ $tagger->name,
+ $image->getURL()
+ )
+ );
}
}
|