From 62ac0ff21ecf8292e55722cdcdce08fa8bbdb87d Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 23 Mar 2022 19:01:42 +0000 Subject: streamline comment policy with downstream --- include/items.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 10a5a3385..8a2faa623 100644 --- a/include/items.php +++ b/include/items.php @@ -1073,21 +1073,6 @@ function encode_item($item,$mirror = false,$zap_compat = false) { $x['type'] = 'activity'; $x['encoding'] = 'zot'; - $r = q("select channel_id from channel where channel_id = %d limit 1", - intval($item['uid']) - ); - - if($r) - $comment_scope = PermissionLimits::Get($item['uid'],'post_comments'); - else - $comment_scope = 0; - - $scope = $item['public_policy']; - if(! $scope) - $scope = 'public'; - - $c_scope = map_scope($comment_scope); - $key = get_config('system','prvkey'); // If we're trying to backup an item so that it's recoverable or for export/imprt, @@ -1180,10 +1165,7 @@ function encode_item($item,$mirror = false,$zap_compat = false) { $x['public_scope'] = $scope; - if($item['item_nocomment']) - $x['comment_scope'] = 'none'; - else - $x['comment_scope'] = $c_scope; + $x['comment_scope'] = $item['comment_policy']; if(! empty($item['term'])) $x['tags'] = encode_item_terms($item['term'],$mirror); -- cgit v1.2.3