aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-02-21 22:53:22 -0800
committerBrett Profitt <brett.profitt@gmail.com>2012-02-21 22:53:22 -0800
commit536c037bfa6a04a2a08db94330c9a12fe22cd6cb (patch)
tree19e685ef1add837952f0a969a2d78d6518a90371 /mod/bookmarks
parent8cbd381a47c8a577de23ce7f6b668eba470a0a1e (diff)
downloadelgg-536c037bfa6a04a2a08db94330c9a12fe22cd6cb.tar.gz
elgg-536c037bfa6a04a2a08db94330c9a12fe22cd6cb.tar.bz2
Fixes #4335. Cleaned up the notifications for new content.
Diffstat (limited to 'mod/bookmarks')
-rw-r--r--mod/bookmarks/languages/en.php11
-rw-r--r--mod/bookmarks/start.php24
2 files changed, 19 insertions, 16 deletions
diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php
index 2c589c207..d4980280d 100644
--- a/mod/bookmarks/languages/en.php
+++ b/mod/bookmarks/languages/en.php
@@ -23,10 +23,19 @@ $english = array(
'bookmarks:more' => "More",
'bookmarks:with' => "Share with",
'bookmarks:new' => "A new bookmark",
- 'bookmarks:via' => "via bookmarks",
'bookmarks:address' => "Address of the bookmark",
'bookmarks:none' => 'No bookmarks',
+ 'bookmarks:notification' =>
+'%s added a new bookmark:
+
+%s - %s
+%s
+
+View and comment on the new bookmark:
+%s
+',
+
'bookmarks:delete:confirm' => "Are you sure you want to delete this resource?",
'bookmarks:numbertodisplay' => 'Number of bookmarks to display',
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index 21a2d8940..56bac984a 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -245,21 +245,15 @@ function bookmarks_notify_message($hook, $entity_type, $returnvalue, $params) {
if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'bookmarks')) {
$descr = $entity->description;
$title = $entity->title;
- global $CONFIG;
- $url = elgg_get_site_url() . "view/" . $entity->guid;
- if ($method == 'sms') {
- $owner = $entity->getOwnerEntity();
- return $owner->name . ' ' . elgg_echo("bookmarks:via") . ': ' . $url . ' (' . $title . ')';
- }
- if ($method == 'email') {
- $owner = $entity->getOwnerEntity();
- return $owner->name . ' ' . elgg_echo("bookmarks:via") . ': ' . $title . "\n\n" . $descr . "\n\n" . $entity->getURL();
- }
- if ($method == 'web') {
- $owner = $entity->getOwnerEntity();
- return $owner->name . ' ' . elgg_echo("bookmarks:via") . ': ' . $title . "\n\n" . $descr . "\n\n" . $entity->getURL();
- }
-
+ $owner = $entity->getOwnerEntity();
+
+ return elgg_echo('bookmarks:notification', array(
+ $owner->name,
+ $title,
+ $entity->address,
+ $descr,
+ $entity->getURL()
+ ));
}
return null;
}