From efb6842d748ad35f2843619983a4e3e9b14617a9 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 26 Jan 2015 20:47:53 -0800 Subject: [PATCH] superblock enhancements --- include/enotify.php | 1 + mod/directory.php | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/enotify.php b/include/enotify.php index 6fc771c58..36d457c10 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -333,6 +333,7 @@ function notification($params) { $datarray = array(); $datarray['hash'] = $hash; + $datarray['sender_hash'] = $sender['xchan_hash']; $datarray['name'] = $sender['xchan_name']; $datarray['url'] = $sender['xchan_url']; $datarray['photo'] = $sender['xchan_photo_s']; diff --git a/mod/directory.php b/mod/directory.php index 4ceda293d..2a07208a4 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -274,17 +274,21 @@ function directory_content(&$a) { $arr = array('contact' => $rr, 'entry' => $entry); call_hooks('directory_item', $arr); - - if($sort_order == '' && $suggest) { - $entries[$addresses[$rr['address']]] = $arr['entry']; // Use the same indexes as originally to get the best suggestion first - } - else { - $entries[] = $arr['entry']; - } + unset($profile); unset($location); + if(! $arr['entry']) { + continue; + } + + if($sort_order == '' && $suggest) { + $entries[$addresses[$rr['address']]] = $arr['entry']; // Use the same indexes as originally to get the best suggestion first + } + else { + $entries[] = $arr['entry']; + } } ksort($entries); // Sort array by key so that foreach-constructs work as expected