more comment policy work

This commit is contained in:
zotlabs 2019-01-20 15:52:02 -08:00
parent 4350a64f8d
commit 35f1cee50b

View file

@ -1178,7 +1178,7 @@ class Libzot {
logger($AS->debug()); logger($AS->debug());
$r = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1", $r = q("select hubloc_hash, hubloc_url from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1",
dbesc($AS->actor['id']) dbesc($AS->actor['id'])
); );
@ -1187,7 +1187,7 @@ class Libzot {
} }
$s = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1", $s = q("select hubloc_hash, hubloc_url from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1",
dbesc($env['sender']) dbesc($env['sender'])
); );
@ -1208,10 +1208,10 @@ class Libzot {
// set comment policy depending on source hub. Unknown or osada is ActivityPub. // set comment policy depending on source hub. Unknown or osada is ActivityPub.
// Anything else we'll say is zot - which could have a range of project names // Anything else we'll say is zot - which could have a range of project names
$s = q("select site_project from site where site_url = '%s' limit 1", $s = q("select site_project from site where site_url = '%s' limit 1",
dbesc($hubloc['hubloc_url']) dbesc($r[0]['hubloc_url'])
); );
if((! $s) || (in_array($s[0]['site_project'],[ '', 'osada' ]))) { if((! $s) || (in_array($s[0]['site_project'],[ '', 'osada' ]))) {
$arr['comment_policy'] = 'authenticated'; $arr['comment_policy'] = 'authenticated';
} }