aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index 64eeae4b4..9d93accfe 100755
--- a/include/items.php
+++ b/include/items.php
@@ -549,13 +549,17 @@ function encode_item($item) {
intval($item['uid'])
);
- if($r)
+ if($r) {
$public_scope = $r[0]['channel_r_stream'];
- else
+ $comment_scope = $r[0]['channel_w_comment'];
+ }
+ else {
$public_scope = 0;
+ $comment_scope = 0;
+ }
$scope = map_scope($public_scope);
-
+ $c_scope = map_scope($comment_scope);
if($item['item_restrict'] & ITEM_DELETED) {
$x['message_id'] = $item['mid'];
@@ -597,6 +601,11 @@ function encode_item($item) {
if(! in_array('private',$y))
$x['public_scope'] = $scope;
+ if($item['item_flags'] & ITEM_NOCOMMENT)
+ $x['comment_scope'] = 'none';
+ else
+ $x['comment_scope'] = $c_scope;
+
if($item['term'])
$x['tags'] = encode_item_terms($item['term']);