diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-01 18:50:37 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-01 18:50:37 -0700 |
commit | 8b2b92fe3267af0b7f3fea33940a440c847c84f2 (patch) | |
tree | 993fe0f28f5d719cc4e61cdb7ad6f85ff755bfae | |
parent | 75560b0496d431ebbaf5b40951149728e1b78716 (diff) | |
download | volse-hubzilla-8b2b92fe3267af0b7f3fea33940a440c847c84f2.tar.gz volse-hubzilla-8b2b92fe3267af0b7f3fea33940a440c847c84f2.tar.bz2 volse-hubzilla-8b2b92fe3267af0b7f3fea33940a440c847c84f2.zip |
provide compatibility with redmatrix extended item export
-rwxr-xr-x | include/items.php | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php index 059d9fd6a..f7a1e4727 100755 --- a/include/items.php +++ b/include/items.php @@ -939,11 +939,11 @@ function get_item_elements($x) { $arr['item_thread_top'] = $x['item_thread_top']; $arr['item_notshown'] = $x['item_notshown']; $arr['item_nsfw'] = $x['item_nsfw']; - $arr['item_relay'] = $x['item_relay']; + // local only $arr['item_relay'] = $x['item_relay']; $arr['item_mentionsme'] = $x['item_mentionsme']; $arr['item_nocomment'] = $x['item_nocomment']; - $arr['item_obscured'] = $x['item_obscured']; - $arr['item_verified'] = $x['item_verified']; + // local only $arr['item_obscured'] = $x['item_obscured']; + // local only $arr['item_verified'] = $x['item_verified']; $arr['item_retained'] = $x['item_retained']; $arr['item_rss'] = $x['item_rss']; $arr['item_deleted'] = $x['item_deleted']; @@ -953,6 +953,53 @@ function get_item_elements($x) { $arr['item_delayed'] = $x['item_delayed']; $arr['item_pending_remove'] = $x['item_pending_remove']; $arr['item_blocked'] = $x['item_blocked']; + if(array_key_exists('item_flags',$x)) { + if($x['item_flags'] & 0x0004) + $arr['item_starred'] = 1; + if($x['item_flags'] & 0x0008) + $arr['item_uplink'] = 1; + if($x['item_flags'] & 0x0010) + $arr['item_consensus'] = 1; + if($x['item_flags'] & 0x0020) + $arr['item_wall'] = 1; + if($x['item_flags'] & 0x0040) + $arr['item_thread_top'] = 1; + if($x['item_flags'] & 0x0080) + $arr['item_notshown'] = 1; + if($x['item_flags'] & 0x0100) + $arr['item_nsfw'] = 1; + if($x['item_flags'] & 0x0400) + $arr['item_mentionsme'] = 1; + if($x['item_flags'] & 0x0800) + $arr['item_nocomment'] = 1; + if($x['item_flags'] & 0x4000) + $arr['item_retained'] = 1; + if($x['item_flags'] & 0x8000) + $arr['item_rss'] = 1; + + } + if(array_key_exists('item_restrict',$x)) { + if($x['item_restrict'] & 0x0001) + $arr['item_hidden'] = 1; + if($x['item_restrict'] & 0x0002) + $arr['item_blocked'] = 1; + if($x['item_restrict'] & 0x0010) + $arr['item_deleted'] = 1; + if($x['item_restrict'] & 0x0020) + $arr['item_unpublished'] = 1; + if($x['item_restrict'] & 0x0040) + $arr['item_type'] = ITEM_TYPE_WEBPAGE; + if($x['item_restrict'] & 0x0080) + $arr['item_delayed'] = 1; + if($x['item_restrict'] & 0x0100) + $arr['item_type'] = ITEM_TYPE_BLOCK; + if($x['item_restrict'] & 0x0200) + $arr['item_type'] = ITEM_TYPE_PDL; + if($x['item_restrict'] & 0x0400) + $arr['item_type'] = ITEM_TYPE_BUG; + if($x['item_restrict'] & 0x0800) + $arr['item_pending_remove'] = 1; + } } return $arr; |