aboutsummaryrefslogtreecommitdiff
path: root/mod/file
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/file
parent8cbd381a47c8a577de23ce7f6b668eba470a0a1e (diff)
downloadelgg-536c037bfa6a04a2a08db94330c9a12fe22cd6cb.tar.gz
elgg-536c037bfa6a04a2a08db94330c9a12fe22cd6cb.tar.bz2
Fixes #4335. Cleaned up the notifications for new content.
Diffstat (limited to 'mod/file')
-rw-r--r--mod/file/languages/en.php10
-rw-r--r--mod/file/start.php8
2 files changed, 15 insertions, 3 deletions
diff --git a/mod/file/languages/en.php b/mod/file/languages/en.php
index 278076927..b3344cb43 100644
--- a/mod/file/languages/en.php
+++ b/mod/file/languages/en.php
@@ -22,7 +22,6 @@ $english = array(
'file:gallery_list' => "Gallery or list view",
'file:num_files' => "Number of files to display",
'file:user:gallery'=>'View %s gallery',
- 'file:via' => 'via files',
'file:upload' => "Upload a file",
'file:replace' => 'Replace file content (leave blank to not change file)',
'file:list:title' => "%s's %s %s",
@@ -79,6 +78,15 @@ $english = array(
'item:object:file' => 'Files',
'file:newupload' => 'A new file has been uploaded',
+ 'file:notification' =>
+'%s uploaded a new file:
+
+%s
+%s
+
+View and comment on the new file:
+%s
+',
/**
* Embed media
diff --git a/mod/file/start.php b/mod/file/start.php
index f8b512318..120129276 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -200,9 +200,13 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {
if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'file')) {
$descr = $entity->description;
$title = $entity->title;
- $url = elgg_get_site_url() . "view/" . $entity->guid;
$owner = $entity->getOwnerEntity();
- return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $entity->title . "\n\n" . $descr . "\n\n" . $entity->getURL();
+ return elgg_echo('file:notification', array(
+ $owner->name,
+ $title,
+ $descr,
+ $entity->getURL()
+ ));
}
return null;
}