aboutsummaryrefslogtreecommitdiff
path: root/mod/pages
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/pages
parent8cbd381a47c8a577de23ce7f6b668eba470a0a1e (diff)
downloadelgg-536c037bfa6a04a2a08db94330c9a12fe22cd6cb.tar.gz
elgg-536c037bfa6a04a2a08db94330c9a12fe22cd6cb.tar.bz2
Fixes #4335. Cleaned up the notifications for new content.
Diffstat (limited to 'mod/pages')
-rw-r--r--mod/pages/languages/en.php10
-rw-r--r--mod/pages/start.php13
2 files changed, 18 insertions, 5 deletions
diff --git a/mod/pages/languages/en.php b/mod/pages/languages/en.php
index 3620e7e8e..eb9d22708 100644
--- a/mod/pages/languages/en.php
+++ b/mod/pages/languages/en.php
@@ -28,7 +28,15 @@ $english = array(
'pages:navigation' => "Navigation",
'pages:new' => "A new page",
- 'pages:via' => "via pages",
+ 'pages:notification' =>
+'%s added a new page:
+
+%s
+%s
+
+View and comment on the new page:
+%s
+',
'item:object:page_top' => 'Top-level pages',
'item:object:page' => 'Pages',
'pages:nogroup' => 'This group does not have any pages yet',
diff --git a/mod/pages/start.php b/mod/pages/start.php
index b2f26c719..4b230a93d 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -264,13 +264,18 @@ function page_notify_message($hook, $entity_type, $returnvalue, $params) {
$entity = $params['entity'];
$to_entity = $params['to_entity'];
$method = $params['method'];
- if (($entity instanceof ElggEntity) && (($entity->getSubtype() == 'page_top') || ($entity->getSubtype() == 'page'))) {
+
+ if (elgg_instanceof($entity, 'object', 'page') || elgg_instanceof($entity, 'object', 'page_top')) {
$descr = $entity->description;
$title = $entity->title;
- //@todo why?
- $url = elgg_get_site_url() . "view/" . $entity->guid;
$owner = $entity->getOwnerEntity();
- return $owner->name . ' ' . elgg_echo("pages:via") . ': ' . $title . "\n\n" . $descr . "\n\n" . $entity->getURL();
+
+ return elgg_echo('pages:notification', array(
+ $owner->name,
+ $title,
+ $descr,
+ $entity->getURL()
+ ));
}
return null;
}