Add network for unknown contacts in ACL

This commit is contained in:
Hypolite Petovan 2017-04-10 22:10:05 -04:00
parent 05a5e1792d
commit 7f2fddea69
1 changed files with 2 additions and 2 deletions

View File

@ -615,7 +615,7 @@ function acl_lookup(App $a, $out_type = 'json') {
function _contact_link($i){ return dbesc($i['link']); } function _contact_link($i){ return dbesc($i['link']); }
$known_contacts = array_map(_contact_link, $contacts); $known_contacts = array_map(_contact_link, $contacts);
$unknow_contacts=array(); $unknow_contacts=array();
$r = q("SELECT `author-avatar`,`author-name`,`author-link` $r = q("SELECT `author-avatar`,`author-name`,`author-link`, `network`
FROM `item` WHERE `parent` = %d FROM `item` WHERE `parent` = %d
AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%') AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
AND `author-link` NOT IN ('%s') AND `author-link` NOT IN ('%s')
@ -640,7 +640,7 @@ function acl_lookup(App $a, $out_type = 'json') {
'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO), 'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO),
'name' => htmlentities($row['author-name']), 'name' => htmlentities($row['author-name']),
'id' => '', 'id' => '',
'network' => 'unknown', 'network' => $row['network'],
'link' => $row['author-link'], 'link' => $row['author-link'],
'nick' => htmlentities($nick), 'nick' => htmlentities($nick),
'forum' => false 'forum' => false