aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-24 17:45:59 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-24 17:45:59 +0000
commit71c6bbd6db559848c7b7428d53fbe100de589f3c (patch)
treea7f93260f052c83c03363bba7ead755419a5f44a /engine
parent59287f567913ba3e679d2cdcde956c6e77c53ff6 (diff)
downloadelgg-71c6bbd6db559848c7b7428d53fbe100de589f3c.tar.gz
elgg-71c6bbd6db559848c7b7428d53fbe100de589f3c.tar.bz2
Fixed error in notification procedure
git-svn-id: https://code.elgg.org/elgg/trunk@2928 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/notification.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index b4c69f9b5..d73ecc439 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -383,7 +383,7 @@
$object_type = $object->getType(); if (empty($object_type)) $object_type = '__BLANK__';
$object_subtype = $object->getSubtype(); if (empty($object_subtype)) $object_subtype = '__BLANK__';
if (isset($CONFIG->register_objects[$object_type][$object_subtype])) {
-
+
$descr = $CONFIG->register_objects[$object_type][$object_subtype];
$string = $descr . ": " . $object->getURL();
@@ -391,6 +391,7 @@
// (Person defined by container_guid so we can also subscribe to groups if we want)
foreach($NOTIFICATION_HANDLERS as $method => $foo)
if ($interested_users = get_entities_from_relationship('notify' . $method,$object->container_guid,true,'user','',0,'',99999)) {
+
if (is_array($interested_users))
foreach($interested_users as $user) {
if ($user instanceof ElggUser) {
@@ -400,9 +401,9 @@
$object->access_id == ACCESS_LOGGED_IN)
&& $object->access_id != ACCESS_PRIVATE
&& $user->guid != $SESSION['user']->guid
- && $entity instanceof ElggEntity) {
+ && $object instanceof ElggEntity) {
- $methodstring = trigger_plugin_hook('notify:entity:message',$entity->getType(),array(
+ $methodstring = trigger_plugin_hook('notify:entity:message',$object->getType(),array(
'entity' => $object,
'to_entity' => $user,
'method' => $method),$string);
@@ -424,4 +425,4 @@
register_elgg_event_handler('init','system','notification_init',0);
register_elgg_event_handler('create','object','object_notifications');
-?> \ No newline at end of file
+?>