superblock enhancements

This commit is contained in:
friendica 2015-01-26 20:47:53 -08:00
parent fc62d7e577
commit efb6842d74
2 changed files with 12 additions and 7 deletions

View File

@ -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'];

View File

@ -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