diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-05 15:22:20 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-05 15:22:20 +0000 |
commit | e721c3391124c1fdabf834551112a17cb199e415 (patch) | |
tree | dac4525675efbcc7fe21e0a21168e63f87bf1bde /engine | |
parent | a6ea9e3cd91681adbab62519985beb068744d789 (diff) | |
download | elgg-e721c3391124c1fdabf834551112a17cb199e415.tar.gz elgg-e721c3391124c1fdabf834551112a17cb199e415.tar.bz2 |
Belts and braces with notifications
git-svn-id: https://code.elgg.org/elgg/trunk@2656 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/notification.php | 10 |
1 files changed, 8 insertions, 2 deletions
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
|