From e721c3391124c1fdabf834551112a17cb199e415 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 5 Feb 2009 15:22:20 +0000 Subject: Belts and braces with notifications git-svn-id: https://code.elgg.org/elgg/trunk@2656 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/notification.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engine/lib/notification.php') diff --git a/engine/lib/notification.php b/engine/lib/notification.php index 2d43d5e53..bff1b177b 100644 --- a/engine/lib/notification.php +++ b/engine/lib/notification.php @@ -323,6 +323,10 @@ */ function register_notification_object($entity_type, $object_subtype, $english_name) { global $CONFIG; + + if ($entity_type == '') $entity_type = '__BLANK__'; + if ($object_subtype == '') $object_subtype = '__BLANK__'; + if (!isset($CONFIG->register_objects)) { $CONFIG->register_objects = array(); } @@ -375,9 +379,11 @@ ),true)) return true; // Have we registered notifications for this type of entity? - if (isset($CONFIG->register_objects[$object->getType()][$object->getSubtype()])) { + $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->getType()][$object->getSubtype()]; + $descr = $CONFIG->register_objects[$object_type][$object_subtype]; $string = $descr . ": " . $object->getURL(); // Get users interested in content from this person and notify them -- cgit v1.2.3